[Coco] Run Time Error 203 "Illegal Mode"

Rick Ulland rickulland1 at gmail.com
Mon Aug 10 18:19:33 EDT 2020


Just spitballin', I guess scheduling and would try eliminating the 3 
sequential forks to shell. Don't touch, just delete the temp file from 
inside B09 (DELETE "pathname"), and since 'ls' is an external program, 
maybe waste a little time inside B09 so the SHELL lsĀ  command can wrap 
up and close the file before you OPEN read mode.

-ricku
CoNect


On 8/10/20 2:47 PM, Wayne Campbell wrote:
> There are a number of places where a 203 error could occur in this code,
> but none of them seems to be incorrect on the surface. If your module is
> small enough, and you can run it in the Basic09 editing environment, I
> suggest using TRON and TROFF and then stepping through the code to see what
> error gets generated on which line. In my experience, a system level error
> may not always be the exact error occurring, and it may be something that
> will fall under a Basic09 error code in debug mode.
>
> I'm not sure why you are using the touch command, unless it's just to make
> sure the file exists, but that has nothing to do with the error you are
> getting.
>
> Wayne
>
> The Structure of I-Code
> http://www.cocopedia.com/wiki/index.php/The_Structure_of_I-Code
>
>
>
> On Mon, Aug 10, 2020 at 12:34 PM <coco at jechar.ca> wrote:
>
>> On 2020-08-10 16:10, Wayne Campbell wrote:
>>> OK. I had to refresh my memory and make sure I was remembering the 203
>>> error correctly. 203 is an input/output error. Generally, it means you
>>> are
>>> attempting to operate in a file in a manner not consistent with the way
>>> you
>>> opened or created it. Usually, it means you are attempting to write to
>>> a
>>> read only file (:READ) or read from a write only file (:WRITE). If it
>>> isn't
>>> a file, then you are operating on a module as input that should be
>>> output
>>> or vice-versa.
>>>
>>> I agree with what Curtis wrote. You should provide some code here that
>>> can
>>> help us determine where the problem is occuring.
>>>
>>> Wayne
>>>
>>>
>>> On Mon, Aug 10, 2020 at 10:51 AM <coco at jechar.ca> wrote:
>>>
>>>> I have a basic09 module the source compiles fine but when
>>>> I try to run it it gives an error 203.
>>>>
>>>> Not sure where to even start to figure out what's wrong.
>>>> Would anyone know what are the most common sources of a 203 error ?
>>>>
>>>> Charlie
>>>>
>>>> --
>>>> Coco mailing list
>>>> Coco at maltedmedia.com
>>>> https://pairlist5.pair.net/mailman/listinfo/coco
>>>>
>> The Code two related GOSUB subroutines.
>>
>> (* Subroutines *)
>> 100 (* CAPS last setup tem-file *)
>> SHELL "touch /dd/TEMP/dirlist.tmp"
>> SHELL "del /dd/TEMP/dirlist.tmp"
>> SHELL "ls > /dd/TEMP/dirlist.tmp"
>> RETURN
>> 200 (* CAPS last *)
>> GOSUB 100
>> OPEN #fp,"/dd/TEMP/dirlist.tmp":READ
>> WHILE NOT EOF(#fp) DO
>>      READ #fp,line$
>>      tc=ASC(MID$(line$,1,1))
>>      cv=LEN(line$)
>>      IF cv<25 THEN
>>         IF tc<97 THEN
>>            SHELL"RENAME "+line$+" zzz"+line$
>>         ENDIF
>>      ENDIF
>> ENDWHILE
>> CLOSE #fp
>> SHELL "DIRSORT"
>> GOSUB 100
>> OPEN #fp,"/dd/TEMP/dirlist.tmp":READ
>> WHILE NOT EOF(#fp) DO
>>      READ #fp,line$
>>      c$=MID$(line$,1,3)
>>      cv=LEN(line$)
>>      IF c$="zzz" THEN
>>         c$=RIGHT$(line$,(cv-3))
>>         SHELL "RENAME "+line$+" "+c$
>>      ENDIF
>> ENDWHILE
>> CLOSE #fp
>> RETURN
>>
>>
>>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> https://pairlist5.pair.net/mailman/listinfo/coco
>>



More information about the Coco mailing list