Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Difference between pass by value & pass by value and result

rodrigo_paisante3
Active Contributor
0 Likes
517

Hi all,

please, i want to know what is the <b>diference</b> between:

<b>pass by value</b>

<b>pass by value & result.</b>

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
482

Check the demo programs:

demo_mod_tech_example_1

demo_mod_tech_example_2

to find the exact difference.

Regards

3 REPLIES 3
Read only

Former Member
0 Likes
483

Check the demo programs:

demo_mod_tech_example_1

demo_mod_tech_example_2

to find the exact difference.

Regards

Read only

Former Member
0 Likes
482

If you pass a parameter using pass by value, the passed value doesn't get affected when you change it inside the subroutine.

value = 1.

perform test using value.

write:/ value.

form test USING value(value) TYPE i.

value = 2.

write:/ value.

endform.

output would be

2

1

value = 1.

perform test using value.

write:/ value.

form test USING value TYPE i.

value = 2.

write:/ value.

endform.

output would be

2

2

Regards,

Ravi

Read only

rodrigo_paisante3
Active Contributor
0 Likes
482

I mark it answered