[comp.os.vms] A Minor Error in the System Service Manual

forrest@blia.BLI.COM (Jon Forrest) (07/16/87)

There is a contradiction in the documentation for the
$TRNLNM system service. On page SYS-449, in the description of the
$TRNLNM Item Descriptor Fields, in the section for the return
length address field, is the sentence beginning "A longword containing
the address of a word that specifies ...". I assume that this is
correct and that the longword contains the address of a 16-bit word.
However, on page 6-18 and 6-19 there is an example of a Fortran
program that calls $TRNLNM. It uses a rather strange method of passing
a item list but I do understand how it works. The error I see is
that, at the top of page 6-19, the return length address field is
given the address of REPEAT_STR_LEN, which is declared as an
INTEGER*4. Based on the description on page SYS-449, this should
be an INTEGER*2. I checked the Release Notes for 4.5 but there is
no mention of such an error.

This documentation error isn't very serious since it appears in
an example instead of the actual system service description. However,
I just spent about 10 minutes fixing a program that someone else
wrote that mistakenly made the same mistake as the example. In
this case, it was a C program that was using the length of the
returned equivalence name as an index in a character array
in order to put a null byte at the end of the equivalence string.
Needless to say, the program failed.

If I don't get any followups to this showing me an error in my
thinking I will submit an SPR.

Jon Forrest

forrest@blia.BLI.COM
ucbvax!mtxinu!blia!forrest
{pyramid|voder}!blia!forrest