...
Hi Aurel,
Nice try .. :) Joske is a really clever programmer.
If you try the expression 2 * sqrt(7), you will uncover a couple of errors.
Near line 340, you will find bc++ and bo++ which need to be changed to bc = bc + 1, and bo = bo + 1.
(In good old Basic fashion .. :))
Also, it needs a function declaration at the start of the program ..
DECLARE eval_function(name as STRING, expr as STRING)
That gets the program to run and it gives the correct answer - but the output formatting also needs to be changed.
Embedded control characters like '\t' don't work in CB. It would require chr$(9) for a Tab or chr$(10) for a new line.
Near line 130 this helps format the output ..
result = chr$(10) + expression + chr$(9) + eval_line(expression)
A nice program to play with though ..
best wishes, :)
Graham