Author |
Topic: Syntax Error in a compiled executable (Read 1066 times) |
|
JFS
New Member
member is offline


Posts: 11
|
 |
Re: Syntax Error in a compiled executable
« Reply #5 on: Jan 17th, 2015, 07:38am » |
|
Richard,
Many thanks for your kind assistance in sorting this one out. Just a question on structure members and the REM!Fast compiler directive. Could you confirm or correct my understanding please, which is that this would all be acceptable:-
Member% +=0 MEMBER% +=0 DIM Structure{Member%,MEMBER%} DIM StructArray{(10) Member%,MEMBER%} ... REM!Fast Structure{}, StructArray{()}, Member%
...but the addition of this line:-
REM!Fast Structure.Member%
.. would break things
Many thanks,
|
| « Last Edit: Jan 17th, 2015, 07:41am by JFS » |
Logged
|
Best Wishes,
Howard
|
|
|
rtr2
Guest
|
 |
Re: Syntax Error in a compiled executable
« Reply #6 on: Jan 17th, 2015, 09:27am » |
|
on Jan 17th, 2015, 07:38am, JFS wrote:| REM!Fast Structure{}, StructArray{()}, Member% |
|
It's OK to have Structure{} and StructArray{()} in a REM!Fast directive, but adding Member% will cause the program to fail at run-time with a Syntax Error (it's the name of a structure member).
This is called out in the documentation: "You must not include in the list the names of any structure members (even if they happen to share their name with a normal variable)".
Quote:| REM!Fast Structure.Member% |
|
That is invalid syntax; I don't know exactly what would happen if you tried it but it won't be helpful! The docs state that REM!Fast "accepts a list of variable, array, structure, function and procedure names", and what you have there is none of those.
The REM!Fast directive should only be used if it provides a real benefit, and only after your program has been thoroughly debugged. Its incorporation makes the compiled code 'unreadable' and would have made the diagnostics I performed yesterday, to trace the cause of your problem, impossible to carry out.
Richard.
|
|
Logged
|
|
|
|
JFS
New Member
member is offline


Posts: 11
|
 |
Re: Syntax Error in a compiled executable
« Reply #7 on: Jan 17th, 2015, 12:52pm » |
|
That's fine - many thanks for the clarification Richard.
|
|
Logged
|
Best Wishes,
Howard
|
|
|
|