Forum: C Oct 15th, 2008 |
| Replies: 4 Views: 1,199 Done. The working result can be found on "How to Create a Math Calculator in C, the right Way (http://originalcopy-on.blogspot.com/2008/10/how-to-make-math-calculator-right-way.html)" |
Forum: C Oct 11th, 2008 |
| Replies: 4 Views: 1,199 I'm almost done with it, the previous errors are fixed now. The only issue I still have is how to get the last token from the last reduction
("in" in parser.y, but in the current code it looks... |
Forum: C Oct 10th, 2008 |
| Replies: 5 Views: 1,107 You could try to do it my way, like in a programming language: simple calculator using a scanner (re2c) and a parser generator (lemon) (http://www.daniweb.com/forums/thread150222.html)
Too bad... |
Forum: C Oct 9th, 2008 |
| Replies: 4 Views: 1,199 Hi. The following calculator will return wrong values for operations which are more complicated than <INTEGER><OPERATION><INTEGER>. I suppose I'm making a mistake in parser.y, but I can't figure out... |
Forum: PHP Apr 30th, 2008 |
| Replies: 1 Views: 515 $mysql .= mysql_select_db("addressbook", $mysql)
or die (mysql_error());
strip out "$mysql .=". The dot operator is used for concatenating strings, not ressources. |
Forum: PHP Apr 30th, 2008 |
| Replies: 1 Views: 386 try to begin your code with
<?php
This is the universal, right way of doing it |
Forum: PHP Apr 30th, 2008 |
| Replies: 1 Views: 571 a) Site-wide (ie "X-Axis") or b) Site and session-wide (ie "X/Y-Axis") ?
a) Sessions (http://www.php.net/manual/en/features.php)
b) shared memory (http://php.net/manual/en/ref.shmop.php) (do not... |
Forum: PHP Apr 30th, 2008 |
| Replies: 3 Views: 898 you could write a function:
function q($conn,$query) {
$r = @mysql_query(mysql_real_escape_string($query,$conn));
if(!$r) {
throw new Exception(mysql_error($conn));
}
return $r;
} |