X hits on this document

168 views

0 shares

0 downloads

0 comments

24 / 62

24

Variant Records – Pascal Example

type resident = record

 initials: array [1..2] of char;

 case married: boolean of

   true: (

     husband_income: integer;

     wife_income: integer;

   );

   false: (

     income: real;

   );

 id_number: integer;

end;

wife_income (4 bytes)

husband_income (4 bytes)

married (1 byte)

initials (2 bytes)

married (1 byte)

initials (2 bytes)

income (4 bytes)

Case is TRUE

Case is FALSE

Document info
Document views168
Page views168
Page last viewedFri Dec 09 08:10:49 UTC 2016
Pages62
Paragraphs993
Words3163

Comments