Thread View: net.lang.pasca
1 messages
1 total messages
Started by utzoodecvaxharponpoivnpoishouxmi...
Sun, 12 Dec 1982 15:27
Re: Peek and poke using variant records - (nf)
Author: utzoodecvaxharponpoivnpoishouxmi...
Date: Sun, 12 Dec 1982 15:27
Date: Sun, 12 Dec 1982 15:27
27 lines
1292 bytes
1292 bytes
#R:peri:-16000:uiucdcs:27900003:000:788 uiucdcs!essick Dec 12 14:21:00 1982 Under PASCAL-6000 and NOS-1.4 you can read the command line and print it out with the following program segment. You have to disable runtime checks for this portion of your program or you will get invalid pointer errors (PASCAL-6000 keeps some info laying around which it checks to see if the object pointed to is the right type) type string = packed array [ 0.. 100] of char; var cc : record case boolean of true : ( x : integer); false: ( strptr : ^ string); end; begin cc.x := 67b; (* point it at the record *) for i := 0 to whatever do write (output, strptr^[i]); writeln (output); end; I may have baubled the actual number for the command line. I am not sure if the Berkeley Pascal behaves in the same way. -- Ray Essick, University of Illinois at Urbana-Champaign
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads