× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The system will allocate 32 bytes of memory for a parameter, unless you type more than that. So if you type less than 1001 (with the two bytes for length added), but more than 32, it'll allocate whatever you type.

If the allocation is shorter than the program expects, then you'd get whatever happened to be adjacent in memory as part of your data.

If the program receiving the parameter does not change the length, then it's possible that you only need the amount specified in the length bytes... (In this case, CONST should also be specified on the prototype to ensure that the program doesn't try to change the data.)

To get a larger command-line, you can type 'CALL QCMD' and then hit F11. I have not checked to see if that's large enough for a full-length hex parameter, though. :-)


On 7/2/2014 3:43 PM, John Yeung wrote:
On Wed, Jul 2, 2014 at 4:22 PM, Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> wrote:
Well, you COULD call from the command line, it'd just be very awkward :-)
You'd have to give the parameter in hex, using the first 2 bytes as the
length, and then providing (at least) 999 characters (since it's in hex,
that'd be 1998 hex digits) to force the field length to 999.

Hmm... what happens if you don't fill up the 999 characters? Is it an
error, or do you just get whatever happens to be in memory for the
remainder (which I guess would be OK if your initial 2 bytes specified
a small enough length)? If you're in 80-column mode, the whole screen
doesn't even have room to complete one hex parameter. :)

John Y.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.