www.markiske.tk - projecten: matske

WWW.MARKISKE.TK

BLOG - DR - FOTO'S - GEDICHTEN - PROJECTEN - Q-BASIC - WEGWIJZERS - ZVEA



MATSKE.BAS - een progje in Qbasic

CLS
OPEN "purepoem.txt" FOR OUTPUT AS #1
RANDOMIZE TIMER

1

LET e = 3
LET t = 3
LET d = 3
LET ee = 3
LET tt = 3
LET dd = 3
LET eee = 3
LET ttt = 3
LET ddd = 3

10

LET u = INT(RND * 3) + 1

SELECT CASE u
CASE 1
LET e = 4
CASE 2
LET t = 4
CASE 3
LET d = 4
END SELECT

20

LET uu = INT(RND * 3) + 1

SELECT CASE uu
CASE 1
IF e = 4 THEN
GOTO 20
END IF
LET ee = 4
CASE 2
IF t = 4 THEN
GOTO 20
END IF
LET tt = 4
CASE 3
IF d = 4 THEN
GOTO 20
END IF
LET dd = 4
END SELECT

30

IF e = 4 AND tt = 4 THEN
LET ddd = 4
END IF
IF e = 4 AND dd = 4 THEN
LET ttt = 4
END IF
IF t = 4 AND ee = 4 THEN
LET ddd = 4
END IF
IF t = 4 AND dd = 4 THEN
LET eee = 4
END IF
IF d = 4 AND ee = 4 THEN
LET ttt = 4
END IF
IF d = 4 AND tt = 4 THEN
LET eee = 4
END IF

100

IF sc = 10 THEN
LET sc = 0
LET se = 0
LET st = 0
LET sd = 0
PRINT #1, ""
GOTO 200
END IF

LET s = INT(RND * 3) + 1
IF s = 1 THEN
GOTO 110
END IF
IF s = 2 THEN
GOTO 120
END IF
IF s = 3 THEN
GOTO 130
END IF

110
IF se < e THEN
PRINT #1, "I ";
LET se = se + 1
LET sc = sc + 1
END IF

GOTO 100

120
IF st < t THEN
PRINT #1, "II ";
LET st = st + 1
LET sc = sc + 1
END IF

GOTO 100

130
IF sd < d THEN
PRINT #1, "III ";
LET sd = sd + 1
LET sc = sc + 1
END IF

GOTO 100

200

IF bc = 3 THEN
GOTO 1000
END IF

IF sc = 10 THEN
LET sc = 0
LET se = 0
LET st = 0
LET sd = 0
PRINT #1, ""
GOTO 300
END IF

LET s = INT(RND * 3) + 1
IF s = 1 THEN
GOTO 210
END IF
IF s = 2 THEN
GOTO 220
END IF
IF s = 3 THEN
GOTO 230
END IF

210
IF se < ee THEN
PRINT #1, "I ";
LET se = se + 1
LET sc = sc + 1
END IF

GOTO 200

220
IF st < tt THEN
PRINT #1, "II ";
LET st = st + 1
LET sc = sc + 1
END IF

GOTO 200

230
IF sd < dd THEN
PRINT #1, "III ";
LET sd = sd + 1
LET sc = sc + 1
END IF

GOTO 200

300

IF sc = 10 THEN
LET sc = 0
LET se = 0
LET st = 0
LET sd = 0
PRINT #1, ""
GOTO 400
END IF

LET s = INT(RND * 3) + 1
IF s = 1 THEN
GOTO 310
END IF
IF s = 2 THEN
GOTO 320
END IF
IF s = 3 THEN
GOTO 330
END IF

310
IF se < eee THEN
PRINT #1, "I ";
LET se = se + 1
LET sc = sc + 1
END IF

GOTO 300

320
IF st < ttt THEN
PRINT #1, "II ";
LET st = st + 1
LET sc = sc + 1
END IF

GOTO 300

330
IF sd < ddd THEN
PRINT #1, "III ";
LET sd = sd + 1
LET sc = sc + 1
END IF

GOTO 300

400

LET bc = bc + 1

LET sc = 0
LET se = 0
LET st = 0
LET sd = 0
PRINT #1, ""
GOTO 100

1000

CLOSE #1
END


www.markiske.tk is in handen van Mark Iske en bevat zowel dit als dat, en is groener dan groen door te bestaan uit 100% gerecyclede electronen.