Path: utzoo!attcan!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond!diamond From: diamond@diamond.csl.sony.junet (Norman Diamond) Newsgroups: comp.lang.c Subject: Re: strings Message-ID: <10262@socslgw.csl.sony.JUNET> Date: 18 May 89 04:08:35 GMT References: <2846@tank.uchicago.edu> <5785@cbnews.ATT.COM> <10087@smoke.BRL.MIL> <10245@socslgw.csl.sony.JUNET> <190@mole-end.UUCP> <10255@socslgw.csl.sony.JUNET> <7228@bsu-cs.bsu.edu> Sender: news@csl.sony.JUNET Reply-To: diamond@csl.sony.junet (Norman Diamond) Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan Lines: 34 In article <7228@bsu-cs.bsu.edu> dhesi@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@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?