. ge :: MarkI Timesharing :: 711224B BASICLanguageReferenceManual Nov1970 . 60-tETM»BMCX) mtm ?;, i Notice the use of the backwards arrowi (on some terminals, an underline) toerase a character in Line 40, which: should have started IF SIN(X) etc., andI in Line 80. After typing Line 90, we notice that LETwas mistyped in Line 20, so we retype it,this time correctly. MAXSM 08:30 ILI^QAL VAKIABI^ IN 70NSXTIN30 After receiving the first error message,we inspect Line 70 and find that we usedX0 for a variable instead of XO. Thenext two error messages relate to lines30 and 80, where we see that we mix


. ge :: MarkI Timesharing :: 711224B BASICLanguageReferenceManual Nov1970 . 60-tETM»BMCX) mtm ?;, i Notice the use of the backwards arrowi (on some terminals, an underline) toerase a character in Line 40, which: should have started IF SIN(X) etc., andI in Line 80. After typing Line 90, we notice that LETwas mistyped in Line 20, so we retype it,this time correctly. MAXSM 08:30 ILI^QAL VAKIABI^ IN 70NSXTIN30 After receiving the first error message,we inspect Line 70 and find that we usedX0 for a variable instead of XO. Thenext two error messages relate to lines30 and 80, where we see that we mixedvariables. This is corrected by changingLine 80. NOTE: The use of the word LET is assignment statements is optional,be written X0=0. Line 20 could also 14 70 pmm xo,x,D «0IFSIN(X) -M THEN 8080 NEXT X HIM ,3 09 ,1 Mm MAXSIN 09:32 UMJEFBIEB LIHBS mJMBER 20 IN 90 90 G0 T0 10 mm MAXSIN 09:32 86PR»rrXO,M,D, 5 PRINT VAL0E*% EES0LOTI0N MAXSm ):S4 VARIABLE IN 5S PRINT ^^;E*% SINE*% ^*RES0LtlTI0N*^ , 0,8995?4 I>; 10 We make both of these changes by retypingLines 70 and 80. In looking over the pro-gram, we also notice that the IF-THENstatement in 40 directed the computer toa DATA statement and not to Line 80where it should go. This is obviously incorrect. We arehaving every value of X printed, so wedirect the machine to cease operations bypressing the break key, even while it isrunning. We ponder the program for awhile, trying to figure out what is wrongwith it. We notice that SIN(O) is com-pared with M on the first time throughthe loop, but we had assigned a value toXO bu»t not to M. However we recall thatall variables are set equal to zero beforea RUN so that line 20 is unnecessary. Of course, Line 90 sent us back to Line20 to repeat the operation and not back toLine 10 to pick up a new value for D. We are about to print out the same tableas before. It is printing out XO, thecurrent value of X, an


Size: 1711px × 1460px
Photo credit: © Reading Room 2020 / Alamy / Afripics
License: Licensed
Model Released: No

Keywords: ., bookcentury1900, bookdecade1910, bookidbitsaversgem, bookyear1919