[Coco] Run Time Error 203 "Illegal Mode"

Rick Ulland rickulland1 at gmail.com
Tue Aug 11 19:02:45 EDT 2020


I thought it was funny the ls -1 option isn't available in OS9, that was 
a  perennial pipe filler in Linux (bash) scripting. Then I looked at the 
builtin 'dir'

'dir -s $PATH'  one item per line
'dir -sf'  just the files
'dir -sd'  just the directories

so something like:
   DELETE $filename
   SHELL 'dir -sf > $filename'


might work?

FWIW, the touch, delete, write sequence comes from *nix scripting, and 
is used because delete will throw an error if the file doesn't exist. 
Touch is meant to prove you can write the file, but it will also create 
the file if needed. Now delete has something to delete even on the first 
run and whatever wonky shell the local admin prefers will complete your 
script with no support call needed. The things we did to get by...

-ricku
CoNect




On 8/11/20 3:20 PM, coco at jechar.ca wrote:
>
> OK I just confirmed that the whole problem was the different version 
> of ls. How do I go about "open the directory yourself"
> sample code please.
>
> Charlie.
>
> On 2020-08-11 17:07, L. Curtis Boyle wrote:
>> Do you need details from the directory, or just the filenames
>> themselves? If the latter, you can open the directory yourself (or use
>> the FILES command).
>>
>>
>> L. Curtis Boyle
>> curtisboyle at sasktel.net
>>
>> TRS-80 Color Computer Games website
>> http://www.lcurtisboyle.com/nitros9/coco_game_list.html
>>
>> NitrOS-9 Ease of Use (EOU) Project
>> http://www.lcurtisboyle.com/nitros9/nitros9.html
>>
>>
>>
>>
>>> On Aug 11, 2020, at 1:59 PM, coco at jechar.ca wrote:
>>>
>>>
>>> Actually I am going to do a drastically different version that will
>>> require a complete rewrite. Also the current version depends on
>>> ls outputting only one file per line which was the old standard
>>> however newer versions of ls like the one in EOU do not work
>>> this way.
>>>
>>> By the way I had tried update and still had problems. It may be
>>> coming from the change in how ls operates.
>>>
>>> Charlie.
>>>
>



More information about the Coco mailing list