Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Multi-line statements
The OI precompiler allows the vertical bar character '|' to be used for splitting a single Basic+ statement over multiple lines (see RTP5 compiler doesn't like multi lines). The SRP precompiler appears to be using this character for something else, though.
Is there another way for the SRP precompiler to support multiline statements?
Cheers, M@
Is there another way for the SRP precompiler to support multiline statements?
Cheers, M@
Comments
Service Whatever(Data, Test)
Becomes this:
Whatever: | Data = If Assigned(Param1) then Param1 else "";Test = If Assigned(Param2) then Param2 else ""
Without that pipe, the colon is treated as concatenation. Semi-colon doesn't work either. So, the answer is, no, I can't not use it unless we give up Events, Services, and the upcoming Tests features of the language.
I am curious why my use of pipes would be interfering.
#pragma output SYSLISTS MY_PRECOMPILER_OUTPUT
Then open this record up and let us know what seems to be the problem.
I was doing this
If (shape.right >= selection.left) AND | (shape.top <= selection.bottom) AND | (shape.left <= selection.right) AND | (shape.bottom >= selection.top) then Gosub Overlap End
but should be doing this
If (shape.right >= selection.left) | AND (shape.top <= selection.bottom) | AND (shape.left <= selection.right) | AND (shape.bottom >= selection.top) then Gosub Overlap End
Cheers, M@