Thats normal. You have two Procedure Keywords and only one EndProcedure....
Add a ;} after EndProcedure and all is ok ...
Wrong folding with CompilerIf in Procedure declaration
Re: Wrong folding with CompilerIf in Procedure declaration
Thank you for posting your workaround!
- Crusiatus Black
- Enthusiast
- Posts: 389
- Joined: Mon May 12, 2008 1:25 pm
- Location: The Netherlands
- Contact:
Re: Wrong folding with CompilerIf in Procedure declaration
I usually use a method where a Macro contains the body and I simply define the procedure twice.
Code: Select all
Macro ProcedureName_Body()
If((a + b) % 2 = 0)
Debug "Sum is even!"
Else
Debug "Sum isn't even! :("
EndIf
EndMacro
CompilerIf #PB_Compiler_OS = #PB_OS_Windows
Procedure ProcedureName(a.i, b.i)
ProcedureName_Body()
EndProcedure
CompilerElse
ProcedureC ProcedureName(a.i, b.i)
ProcedureName_Body()
EndProcedure
CompilerEndIf
ProcedureName(10, 3)