Welcome, Guest. Please login or register.

Author Topic: Re-opening a file in A/Rexx  (Read 1286 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline LoadWBTopic starter

  • Hero Member
  • *****
  • Join Date: Jul 2006
  • Posts: 2901
  • Country: 00
Re-opening a file in A/Rexx
« on: September 16, 2015, 05:11:12 AM »
I am having a problem in Regina trying to open a file for a second time, even after properly closing the file.  This code below

Code: [Select]
/* */

OPTIONS AREXX_BIFS AREXX_SEMANTICS

if open(handle, 'test.bin', 'r') then
   say 'File opened'
else say 'Cannot open file'
   
if close(handle) then
   say 'File closed'
else say 'Cannot close file'

if open(handle, 'test.bin', 'r') then
   say 'File opened'
else say 'Cannot open file'

exit


Results in

Code: [Select]
File opened
File closed
Cannot open file


I am using ARexx symantecs, but my Amiga is disassembled for moving.  Would someone try this out in ARexx and give me the results?  Even better, can someone tell me why this might not work?  I have found a few threads on re-opening files, but they're by the big-iron guys and they talk a lot about EXECIO.