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
FUNCTION statement
-
AriSilva
- Posts: 625
- Joined: July 22nd, 2016, 3:55 pm
Re: FUNCTION statement
By looking carefully the function statement indeed has an END statement, what seemed to be wrong was the ; in the function declaration.
Sorry
Ari
Sorry
Ari
Best
Ari
Ari
-
aaronw
- Posts: 571
- Joined: June 9th, 2016, 9:38 am
- Location: Washington, DC
Re: FUNCTION statement
No problem, glad you got it figured out.