strings

Norman Diamond diamond at diamond.csl.sony.junet
Thu May 18 14:08:35 AEST 1989


In article <7228 at bsu-cs.bsu.edu> dhesi at bsu-cs.bsu.edu (Rahul Dhesi) writes:

>     var
>        read_input : varying [30] of char;  (* where input will go *)

>     sys_stat := $qiow (chan := channel, func := io$_readvblk, 
>                        iosb := io_statblk,
>                        p1 := read_input.body,
>                        p2 := size (read_input.body) );
>     read_input.length := io_statblk.count;

>Note that we could not simply pass our variable-length string variable
>read_input to QIOW.  Instead, we had to separately pass the address of
>the data area of the string (called read_input.body) and its maximum
>size.  Then when input was complete, we had to copy the byte count from
>the status block field io_statblk.count into the length field of
>read_input.length.

This "varying" structure was invented (or re-invented by DEC) long
after the QIOW system call was defined.  Perhaps a new system call
should also have been defined to replace QIOW?

OK, it is necessary to clarify my statement.  DEC required their
language implementors, with one exception, to conform to certain
storage and descriptor standards that were specified by the operating
system.  Therefore, with one exception, hacks are not needed to
share data among several languages, when the languages all have
syntactic constructs for the data.  The exception:  assembly language.

--
Norman Diamond, Sony Computer Science Lab (diamond%csl.sony.co.jp at relay.cs.net)
  The above opinions are my own.   |  Why are programmers criticized for
  If they're also your opinions,   |  re-implementing the wheel, when car
  you're infringing my copyright.  |  manufacturers are praised for it?



More information about the Comp.lang.c mailing list