FUNCTION statement

Discussions about editing and cleaning data
Forum rules
New release: CSPro 8.0
Post Reply
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

FUNCTION statement

Post 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
Best
Ari
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: FUNCTION statement

Post 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
Best
Ari
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: FUNCTION statement

Post by aaronw »

No problem, glad you got it figured out.
Post Reply