[Coco] CoCoFEST - Dart Time Sharing System Contest

Al Hartman alhartman6 at optonline.net
Sun Aug 24 17:22:54 EDT 2014


I don't think that you understand how the test function works. I don't 
either. It's not explained well in the manual.

I think your program is correct.

-[ Al ]-

-----Original Message----- 
From: Wayne Campbell

Hi Kip,

I decided to try a simple test program first, and found that I got
unexpected results. I would like to know if the following is normal with
the DTSS system, or if I am misunderstanding something. What follows is my
documentation of the session.

Actually it was two sessions, because I did not type SYSTEM BASIC before I
performed this first, so afterward, I quit the session, started over and
typed SYSTEM BASIC before I began writing the code. I found that the system
defaults to SYSTEM BASIC because I got the exact same results the second
time.

I started by typing NEW PGRM to begin a new program. Then I entered the
code as you see it below. I saved the program by typing SAVE PGRM. The file
named PGRM showed up in the folder. Loading it into TextPad (my editor of
choice) showed it to be a normal text file, as were the other files. Then I
quit the session and started fresh to be sure nothing was lingering from
the editing session.

If I type OLD PGRM*** I get an error that the program is not saved.
If I type OLD PGRM it loads, and typing LIST produces the listing.

10 LET X = 1
20 LET Y = 10
30 FOR Z = X TO Y
40 PRINT Z, Z-X; Z-Y
50 PRINT Z, Z+X; Z+Y
60 NEXT Z
70 END

If I type RUN I get the expected output.

1              0    -9
1              2     11
2              1    -8
2              3     12
3              2    -7
3              4     13
4              3    -6
4              5     14
5              4    -5
5              6     15
6              5    -4
6              7     16
7              6    -3
7              8     17
8              7    -2
8              9     18
9              8    -1
9              10    19
10             9     0
10             11    20

If I type TEST, I get the following ten times.

ILLEGAL  NUMBER      IN
0

I do not know what to think. Why an error in a non-existent line? And, why
ten times? Is it a run-time error, once for each iteration of the FOR/NEXT
loop?

Wayne



More information about the Coco mailing list