Page 1 of 1

FUNCTION statement

Posted: March 11th, 2019, 9:46 am
by AriSilva
I was reviewing a third party´s program and I found the following command:

FUNCTION TRABAJA(IND);

The function command should be finished with an END statement, but the compiler did not detect that.
Later in the program I found

TRABAJA = PUNTAJES;

How can a function name receive a value?

And then

NUMERIC TRABAJANDO = TRABAJA(SECUENCIA);

This call should return a default value? Or zero?

Very interesting
Best
Ari

Re: FUNCTION statement

Posted: March 11th, 2019, 9:58 am
by AriSilva
By looking carefully the function statement indeed has an END statement, what seemed to be wrong was the ; in the function declaration.
Sorry
Ari

Re: FUNCTION statement

Posted: March 11th, 2019, 4:35 pm
by aaronw
No problem, glad you got it figured out.