GoneHiking
Technical User
I'm just starting to learn Rexx, and do NOT come from a programming background, so go easy on me
I'd like someone to explain this snippet of code to me. I get that "2" is passed to the ARG statement. What I don't get is the RETURN Code part. The explanation the author gave was that "it returns the value of a variable called RESULT." Huh? How does the variable Code suddenly become Result????
CALL Funct1 2
SAY "Give the funct1 a" 2 "and you get back a" Result
SAY "Give the funct1 a" 4 "and you get back a" Funct1(4)
EXIT 0
Funct1:
ARG Input
Code = Input * 3
RETURN Code
I'd like someone to explain this snippet of code to me. I get that "2" is passed to the ARG statement. What I don't get is the RETURN Code part. The explanation the author gave was that "it returns the value of a variable called RESULT." Huh? How does the variable Code suddenly become Result????
CALL Funct1 2
SAY "Give the funct1 a" 2 "and you get back a" Result
SAY "Give the funct1 a" 4 "and you get back a" Funct1(4)
EXIT 0
Funct1:
ARG Input
Code = Input * 3
RETURN Code