jroriz Active Member Licensed User Longtime User Nov 30, 2018 #1 Hi. Is it possible to pass a parameter by reference to a sub?
A amykonio Active Member Licensed User Longtime User Dec 1, 2018 #2 jroriz said: Hi. Is it possible to pass a parameter by reference to a sub? Click to expand... Based on the documentation, no. From B4xBasicLanguageV1_4.pdf booklet (edition 1.4, Update date: 28/11/2018, page: 56): In B4X, the parameters are transmitted by value and not by reference. Andreas. Upvote 0
jroriz said: Hi. Is it possible to pass a parameter by reference to a sub? Click to expand... Based on the documentation, no. From B4xBasicLanguageV1_4.pdf booklet (edition 1.4, Update date: 28/11/2018, page: 56): In B4X, the parameters are transmitted by value and not by reference. Andreas.
alwaysbusy Expert Licensed User Longtime User Dec 1, 2018 #3 An object like an aray, map or list can mimic this behavior as you can change its value in the method and it will be changed when it returns from the method. Upvote 0
An object like an aray, map or list can mimic this behavior as you can change its value in the method and it will be changed when it returns from the method.
jroriz Active Member Licensed User Longtime User Dec 1, 2018 #4 That's exactly what I need! I have a temporary list that I need to manipulate. Solved! Thanks. alwaysbusy said: An object like an aray, map or list can mimic this behavior as you can change its value in the method and it will be changed when it returns from the method. Click to expand... Upvote 0
That's exactly what I need! I have a temporary list that I need to manipulate. Solved! Thanks. alwaysbusy said: An object like an aray, map or list can mimic this behavior as you can change its value in the method and it will be changed when it returns from the method. Click to expand...