Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!cbmvax!bj From: bj@cbmvax.commodore.com (Brian Jackson) Newsgroups: comp.sys.amiga.programmer Subject: Re: REXX and files Message-ID: <19271@cbmvax.commodore.com> Date: 24 Feb 91 21:55:17 GMT References: <91053.124724FORDE@vm.poly.edu> Reply-To: bj@cbmvax.commodore.com (Brian Jackson) Organization: Commodore, West Chester, PA Lines: 34 In article <91053.124724FORDE@vm.poly.edu> FORDE@vm.poly.edu writes: >I am new to Amiga Rexx and I am having problems with certain >Rexx commands. I am trying to use the showdir(), open(), and >readln() commands, but theprogram doesnt want to work. could >someone send me a few examples of working with files through >rexx on the amiga. I am used to REXX on the IBM mainframe. You'll need to make your own little ASCII "testfile" for this... /* t.rexx - shows open(), showdir() ,readln() and close() usage */ dirline = showdir('dh0:') do x = 1 to words(dirline) say "word" x "=" word(dirline, x ) end success = open( infile, "testfile", "read") if (success) then do while ~eof(infile) inline = readln(infile) say inline end close(infile) /* end */ bj ----------------------------------------------------------------------- | Brian Jackson Software Engineer, Commodore-Amiga Inc. GEnie: B.J. | | bj@cbmvax.cbm.commodore.com or ...{uunet|rutgers}!cbmvax!bj | | "We defy augury" | -----------------------------------------------------------------------