[Coco] Copying over an IO ERROR

William Astle lost at l-w.ca
Tue Feb 3 16:29:58 EST 2015


Also, the DIM statement on line 10 is not required. DECB will happily 
define any variable the first time it is encountered so predefining them 
with DIM is not needed.

Some experimentation shows that DIM with scalar variables does define 
the scalar variables, though, even though it's only documented for use 
in defining arrays. (At least I don't remember any official DECB type 
references indicating DIM with scalar variables.)

On 15-02-03 02:22 PM, Allen Huffman wrote:
> Looks like it's a semicolon, not a comma, for input.
>
> And it appears it is ON ERR instead of ERROR.
>
>> 10 CLEAR 1000:DIM SD,DD,T,S,S1$,S2$
>> 20 INPUT "SRC DRIVE";SD
>> 30 INPUT "DST DRIVE";DD
>> 40 T=0:S=1
>> 50 ON ERR GOTO 130
>> 60 PRINT "TRACK:";T;"SECTOR:";S
>> 70 DSKI$ SD,T,S,S1$,S2$
>> 80 DSKO$ DD,T,S,S1$,S2$
>> 90 S=S+1:IF S>18 THEN S=1:T=T+1
>> 100 IF T<35 THEN 50
>> 110 PRINT "DONE"
>> 120 END
>> 130 PRINT"ERROR!":GOTO 90
>



More information about the Coco mailing list