|
Looking for advice... The following code works fine for my purposes at the moment. Since I have a little extra time on this project I'd like to have this as a service program. Basically I use this for command interfaces. When receiving parameter data from the command interface, the data comes in as varsize with a 5i 0 parameter length. Instead of having to duplicate this code for each keyword that can return multiple values, I would like to have a procedure that I pass the number of entries for the parameter, received data string & dynamically allocate the space for the data & return a pointer to the data. Here's the working example: For i = 0 To ( SpCount - 1 ); BndSrvPgm_(i+1) = %Subst(BindSrvPgm :3 + ( i * %Size(SrvPgm_) ) :%Size(SrvPgm_)); EndFor; I'd like to do something like this in my main procedure: ParmPtr = DynamicArray(EntryCount : EntryData); & have a dynamic array DS based on the return pointer. Since I can't use a variable DIM count to define the dynamic array DS, what would you folks suggest?? Thanks, Tommy Holden
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.