home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TP_ADV.ZIP / LIST0303.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-11-19  |  632 b   |  34 lines

  1. Program XChange;
  2.  
  3. {$L SWAP.OBJ}
  4.  
  5. {$F+}
  6. Procedure Swap ( var one, two; MoveSize : Word ); external;
  7. {$F-}
  8.  
  9. Type
  10.   recType = Record
  11.               b : Byte;
  12.               w : Word;
  13.               r : Real;
  14.               s : String;
  15.             End;
  16.  
  17. Var
  18.   r1,
  19.   r2 : recType;
  20.  
  21. Begin
  22.   r1.b := 163;           { Initialize record R1 }
  23.   r1.w := 12345;
  24.   r1.r := 3.14159;
  25.   r1.s := 'This is a test. Number 1';
  26.  
  27.   r2.b := 136;           { Initialize record R2 }
  28.   r2.w := 54321;
  29.   r2.r := 123.321;
  30.   r2.s := 'This is the second string. Number 2';
  31.  
  32.   Swap ( r1, r2, SizeOf ( r2 ) ); { Swap R1 and R2 }
  33. End.
  34.