I'm confused in call by reference and content, which one is default. Can you please explain?
Regards
CALL by reference and content.
-
- Registered Member
- Posts: 11
- Joined: Wed Mar 26, 2014 4:49 pm
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: CALL by reference and content.
From the Language Reference manual section on the CALL statement:
CALL BY REFERENCE passes the variable address to the subprogram, so if you change the value in the subprogram, the changed value will still be changed when the calling program regains control. CALL BY CONTENT passes a copy of the variable to the subprogram, so if you change the value in the subprogram, you do NOT change the value when the calling program regains control.BY REFERENCE is assumed if you do not specify a BY CONTENT, BY REFERENCE, or BY VALUE phrase prior to the first parameter.
-
- Registered Member
- Posts: 11
- Joined: Wed Mar 26, 2014 4:49 pm
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute