home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ob140os2.zip / SWAPDEMO.B < prev    next >
Text File  |  1997-09-12  |  294b  |  15 lines

  1. * This shows how to use the SWAP (alias EXCHANGE) statement
  2.  
  3.  DIM A$ AS STRING*7
  4.  DIM B$ AS STRING*7
  5.  
  6.  A$="string1"
  7.  B$="string2"
  8.  
  9.  PRINT A$,B$
  10.  SWAP A$,B$
  11.  PRINT A$,B$
  12.  
  13. * Note that swap works with any 2 like data types of the same size
  14. * including user defined types and arrays.
  15.