I always use QuickBasic 4.5 compiled >>>October 19 2007 at 12:24 PM
|Moneo (no login)|
Response to The # at the end of the number was a dead giveaway!
therefore, I can't perceive the # that your interpreted QBasic version gives you automatically. Now I understand why the need for using a DOUBLE versus a SINGLE for the value in question, is so obvious to you.
What amazes me is that this problem has not become apparent on QB4.5 compiled programs that use SINGLE variable types. What I now realize that's happening, is that when the user enters a value which exceeds the limits of a SINGLE. QuickBasic compiled just cavalierly truncates the input number so that it fits into the specified SINGLE variable.
The condition could be resolved by using Mac's "Edit" program to validate the input value based on what type of variable will be used to store it. The version of this "Edit" program that I have is about 220 lines of code, and therefore a heavy addition to any program that might have this problem.
Can you think of some other solution for compiled programs using SINGLE variables?
Only using DOUBLE variables has a similar problem. The user input value could conceivably go beyond the limits of a DOUBLE, and be truncated.