` Passing multiple parameters as Group (Jim Gambon) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Clarion in general: Passing multiple parameters as Group
2004-10-26 -- Jim Gambon
 
Newsgroups: softvelocity.clarion.language > Since all of these Variables need to be "Passed by Address", could I simply > use a Group and pass the entire Group to each of the functions? You will have to do one of two things, if you want to pass this all as a group. You could have the group be a group of LONGs that hold the addresses. Then, in the receiving procedure, re-cast these into the various types of reference variables (&CSTRING, &ULONG, &STRING, etc.) The only problem with this is that string type reference variables hold a data size value in addition to the memory address. Not having the size messes up some operations like CLEAR and string-slicing. The other way would be to have the group be a group of reference variables that you assign in the calling procedure. The only downside to this is that you will have to take the extra step of having each individual variable available to reference assign to the appropriate member of the group. Once you pass the group the receiving procedure should be able to use the member items as is. Oh, and don't forget that you can pass the group by address as well once you have it defined as a "type". Just some thoughts. Let me know if this is clear, or if you need some code specifics (like for the casting). And let us know how it works out for you Regards, Jim


Today is November 21, 2024, 3:39 am
This article has been viewed 35232 times.
Google search has resulted in 14 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: