home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 018.lha / examples / file.st < prev    next >
Text File  |  1986-10-19  |  335b  |  17 lines

  1. Class Main
  2. [
  3.     main        | f g |
  4.         f <- File new ; open: 'file.st'.
  5.         g <- File new ; open: 'foo' for: 'w'.
  6.         f do: [:x | g write: x reversed].
  7.         g <- File new ; open: 'foo' for: 'r'.
  8.         g do: [:x | x print].
  9.         f modeCharacter.
  10.         f first print.
  11.         10 timesRepeat: [ f next print ].
  12.         (f at: 2) print.
  13.         f currentKey print.
  14.         f size print.
  15. ]
  16.  
  17.