This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Autosized Strings by ref in InstallScript
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 25, 2010
09:50 AM
Autosized Strings by ref in InstallScript
Hi all,
In the documentation I saw this statement:
An autosized string variable that is passed by reference to a function is not autosized within the called function. If the function attempts to assign a value whose length is greater than the current size of that parameter, run-time error 401 occurs
Yet, when I tried this situation everything worked ok even if an autosized string was passed by reference and was resized inside the function.
So, should I adapt my code to the above statement or not?
Thanks,
Assaf.
In the documentation I saw this statement:
An autosized string variable that is passed by reference to a function is not autosized within the called function. If the function attempts to assign a value whose length is greater than the current size of that parameter, run-time error 401 occurs
Yet, when I tried this situation everything worked ok even if an autosized string was passed by reference and was resized inside the function.
prototype xxx(byref string, byref string);
a = "a";
b = "b";
xxx(a,b); // Will assign larger string constants into the arguments
So, should I adapt my code to the above statement or not?
Thanks,
Assaf.
1 Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 26, 2010
03:16 AM
Interesting fact, this sentence is also contained in the IS2009 documentation but I can't producude the mentioned error either. This limitation would be really bad.
Would be great when a IS developer could say a word about this.
Greetings
Jo
Would be great when a IS developer could say a word about this.
Greetings
Jo
