[SOLVED] ProcedureReturn
Posted: Sat May 11, 2024 11:26 pm
Hello,
Can someone explain to me why this code returns 1 instead 0?
(I tried to find some topic about this but too much collected results with keyword ProcedureReturn)
As there is no value after ProcedureReturn, I expected 0 to be returned.
This is the first time I've been faced with this situation in 20 years....
Can someone explain to me why this code returns 1 instead 0?
(I tried to find some topic about this but too much collected results with keyword ProcedureReturn)
Code: Select all
Procedure.a Test()
Protected.a ReturnValue,Test
If Not Test:ProcedureReturn:EndIf
Debug "Test1"
Debug "Test2"
ProcedureReturn ReturnValue
EndProcedure
ReturnValue.a=test()
Debug ReturnValue
Code: Select all
If Not Test:ProcedureReturn:EndIf
As there is no value after ProcedureReturn, I expected 0 to be returned.
This is the first time I've been faced with this situation in 20 years....
