math error command mode tbsilver

I have tbsilver running on a thinkpad under XP professional 5.1 sp 2 and in the immediate mode (called from tbsilver.exe). The following text copied from the command window illustrates a bug that was originally found by my programmer on another system.

Ok. print asin(-.2)
-.20135792
Ok. print asin(.2)
.20135792
Ok. print asin(.2) +asin(-.2)
-.40271584
Ok. print asin(.2) + asin(-.2)
-.40271584
Ok. print asin(.2) + asin(-.2)
-.40271584
Ok. print asin(-.2) - asin(.2)
0
Ok. print asin(-.2) + asin(.2)
.40271584

When the following line is submitted in the command window, the program crashes.

print asin(.2), asin(-.2), asin(.2) + asin(-.2)

This error is reproducible, but does not seem to occur when using hello.exe.

Can you fix this? Is this likely to occur in my 200 line program operated in the run mode? When compiled?

Thank you,

Comments

Command line printing

Hi,

I have just checked the DOS version 3.05. This gives the correct values for all the examples you gave including the 3 part PRINT statement at the end (which crashes the Windows version). The last example does not crash the DOS version.

Regards
Big John

Command line printing

Hi,

The ability to use the command line to print the values of variables in a running program, or to print the value of an expression, was originally a feature of early DOS (version 3.05) and MAC (version 2.7) versions of TrueBASIC. However, this feature was dropped in the Windows and Mac versions 5.10 up to 5.42. This feature was partially resurrected in version 5.5b19, but only as a means of printing the value of variables in a running program. It also performs the evaluation of simple expressions - but not the example you provided. It is highly unlikely that this problem will be "fixed" in subsequent releases because the command window has been phased out in version 5.611 (the latest version about to be released). Printing the value of variables and expressions during a program run has been solved by a completely different technique.

Instead of using the command line, if you enter the examples you gave as program lines, and you compile and run the program, then the correct answers will be given, including the 3 part PRINT example that crashes the editor when used on the command line.

I will also check to see whether the original DOS version can handle the examples you gave.

Regards
Big John