TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: BOB DUNNELL
from: LAWRENCE GORDON
date: 1996-07-01 18:30:00
subject: Reading Pascal Files

Quoting Bob Dunnell to Lawrence Gordon:
BD> type
BD>     employee = record
BD>              name,                      {31 bytes}
BD>              address : string[30];      {31 bytes}
BD>              salary        : real;      {6  bytes}
BD>              married       : boolean;   {1  byte}
BD>              num_children  : byte;      {1  byte}
BD>     end;                                {70 bytes}
I had a problem converting this construct over to PB.  In PB, single 
precision reals are 4 bytes; double precision reals are 8 bytes.  There isn't 
an equivalent 6 byte real in PB.
BD> var
BD>    temp  : employee;                     {temp record}
BD>    tempf : file of employee;             {temp file handle}
BD>
BD> begin
BD>      with temp do                       {assign values to record}
BD>      begin
BD>           name := 'Lawrence Gordon';
BD>           address := 'Ladue, home of the rich.';
BD>           salary := 780000.45;
If I had that salary, I would hire someone to do my programming. :)
 * WCE 2.1G1/2081 * 
--- InterEcho 1.18
---------------
* Origin: Toast House * (314) 994-0312 * (1:100/560)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.