SP is an assembly register. Since FB doesn't mangle 64-bit code, it causes all sort of weird behavior. Thus, such an error was introduced to prevent this. Most editors have a 'whole word' setting when finding/replacing text, to avoid the mishaps you describe.Triopstor wrote: ↑May 27, 2022 15:31 ...
I wonder what Sp is used for as a reserved word in FreeBASIC? So I'll change this by REPLACING(Ctrl + R) Sp to Sp2
It's good coding practice to have a number in the variable so that it's easier to REPLACE or FIND a variable instead of damaging REM comments
Such as diSplay, correSponding and other English words.
I fixed that part.
A sub and a function are the same thing. Think of subs as 'functions that return no value' and thus cannot be used in expressions (they need to be used as statements)....
Next problem is: D:\QB45\FBIDETEMP.c: in Function 'INITIALIZATION':
D:\QB45\FBIDETEMP.c2: error: label 'label$19' used but not defined
1923 | fb_ErrorSetHandler ( &&label$19 );
| ~~~~~~~~~~~~~~~~~
I don't have a FUNCTION INITIALIZATION but I do have a Subroutine in line 111Code: Select all
DECLARE SUB Initialization ()
The error means that there's probably a goto that points to a label that wasn't defined. Most likely an error handler (via ON ERROR GOTO), judging from the error message.