I am having problem debugging a trivial program in 7.12. I am breaking the simulator with the following code:
' FmtFloat - test CF that passes a copy of the the floating value, A#, and the argument, 1, to
' the StripPlus function with the home that it will return a string in A$
%[1] = StripPlus(A#, 1)
When I try to test this code in the simulator I get the following run-time error message after StripPlus() executes and returns:
"Run-Time Error in Fn #1
Error:illegal memory access!
Program has been Halted"
This is the CF, StripPlus:
' StripPlus on entry %[1] is the float to convert, %[2] is the number of decimal digits
'
A$ = str$(%[1], -%[2])
' Now discarad the leading "+" that gets attached to positive values
if strcmp(mid$(A$,1,1), "+") = 0
A$ = mid$(A$,2,len(A$)-1)
endif
Strip Plus actually does what I want, but I can't figure out what I have done to annoy the simulator.
I can write the code without the use of the "new" parameterized function calls, but I keep thinking there must be a use for this feature.
Do you have any ideas on how I broke the simulator?
Best regards,
Gary D*ckinson