[Info-vax] Home-grown application process dumps
John Reagan
xyzzy1959 at gmail.com
Tue Jan 6 10:49:53 EST 2015
On Tuesday, January 6, 2015 10:28:53 AM UTC-5, cme... at gmail.com wrote:
> That depends on the descriptor and the routine. Descriptors can indicate
> variable length, and many LIB routines will change the allocated size to
> match the data size (check out the STR$ routines). No VMS routine will
> change the allocated size if the descriptor indicates fixed length. Many
> VMS routines will not change the size even if the descriptor indicates
> variable length, but a lot of those take separate length and address
> arguments instead of a descriptors.
If you use Pascal's VARYING OF CHAR (which has a leading WORD length field),
you can get those system routines to actually do the correct thing by giving
them the address of that length word and a fixed-sized descriptor to the body.
They won't resize, but you can declare a large-ish max size and get the benefit
of a varying length string without trimming trailing blanks, scanning for
special characters, etc. The Pascal kit drops a whole truckload of examples
into SYS$EXAMPLES including using same tricks with itemlists.
More information about the Info-vax
mailing list