-
Notifications
You must be signed in to change notification settings - Fork 0
/
basic.txt
47 lines (47 loc) · 974 Bytes
/
basic.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
10 DEF FNOD(X)=((X-INT(X/2)*2)=1)
20 DEF FNPR(X)=X-1
30 DEF FNSU(X)=X+1
40 DEF FNRO(X)=INT(X+0.5)
50 DEF FNSQ(X)=X*X
60 W$="CONSTANT MESSAGE"
70 P=3.1415926
80 Q=5
90 TR=-1
100 PRINT W$,P,Q
110 IF TR THEN PRINT "YES ";
120 IF TR=-1 THEN PRINT "ALSO"
130 XR = 23.12
140 YR = 12.34
150 XB = -1
160 YB = 0
170 XC$ = "#"
180 YC$ = CHR$(65)
190 XI = 12
200 YI = 32000
210 IF (XB)AND(YB)OR(3=4) THEN PRINT "TRUE"
220 FOR XR=0.0 TO 10.0
230 REM BEGIN
240 PRINT XR;
250 NEXT
260 REM END
270 FOR XR=10.0 TO 0.0 STEP -1
280 REM BEGIN
290 PRINT XR;
300 NEXT
310 REM END
320 REM REPEAT
330 PRINT XI;
340 XI = FNSU(XI)
350 IF NOT(XI=15) THEN GOTO 320
360 REM UNTIL
370 IF NOT(YI>31990) THEN GOTO 430
380 REM WHILE
390 REM BEGIN
400 PRINT YI;
410 YI = YI-2
420 GOTO 370
430 REM END
440 XR = ABS(-2.9)
450 IF FNOD(3)=-1 THEN PRINT "3 IS ODD!!!"
460 PRINT "THIS IS BASIC"
470 END