This post relates to the coding horror I posted about earlier today. I dug up my old Tetris code and I found it... the following is the 558 line QuickBasic subroutine I made in high school that prints a string to the screen. Enjoy.
SUB PrintMain (Variable1 AS STRING, Variable2 AS STRING, FunctionNum AS INTEGER)
DIM Letter AS STRING
STATIC PrintColor AS INTEGER
STATIC Left AS INTEGER
STATIC Top AS INTEGER
IF FunctionNum = 0 THEN
FOR i = 1 TO LEN(Variable1)
Letter = MID$(Variable1, i, 1)
IF Letter = "A" THEN
LINE (Left + 2, Top)-STEP(1, 0), PrintColor
LINE (Left + 1, Top + 1)-STEP(3, 0), PrintColor
LINE (Left, Top + 2)-STEP(1, 4), PrintColor, BF
LINE (Left + 4, Top + 2)-STEP(1, 4), PrintColor, BF
LINE (Left + 2, Top + 4)-STEP(1, 0), PrintColor, BF
END IF
IF Letter = "B" THEN
LINE (Left, Top)-STEP(5, 0), PrintColor
LINE (Left + 1, Top + 1)-STEP(1, 4), PrintColor, B
LINE (Left, Top + 6)-STEP(5, 0), PrintColor
LINE (Left + 3, Top + 3)-STEP(2, 0), PrintColor
LINE (Left + 5, Top + 1)-STEP(1, 1), PrintColor, B
LINE (Left + 5, Top + 4)-STEP(1, 1), PrintColor, B
END IF
IF Letter = "C" THEN
LINE (Left + 5, Top + 1)-STEP(1, 0), PrintColor
LINE (Left + 2, Top)-STEP(3, 0), PrintColor
LINE (Left + 1, Top + 1)-STEP(1, 0), PrintColor
LINE (Left, Top + 2)-STEP(1, 2), PrintColor, B
LINE (Left + 1, Top + 5)-STEP(1, 0), PrintColor
LINE (Left + 2, Top + 6)-STEP(3, 0), PrintColor
LINE (Left + 5, Top + 5)-STEP(1, 0), PrintColor
END IF
IF Letter = "D" THEN
LINE (Left, Top)-STEP(4, 0), PrintColor
LINE (Left + 1, Top + 1)-STEP(1, 4), PrintColor, B
LINE (Left, Top + 6)-STEP(4, 0), PrintColor
LINE (Left + 4, Top + 1)-STEP(1, 0), PrintColor
LINE (Left + 5, Top + 2)-STEP(1, 2), PrintColor, B
LINE (Left + 4, Top + 5)-STEP(1, 0), PrintColor
END IF
IF Letter = "E" THEN
LINE (Left + 1, Top)-STEP(1, 6), PrintColor, B
LINE (Left + 2, Top)-STEP(4, 0), PrintColor
LINE (Left + 2, Top + 3)-STEP(2, 0), PrintColor
LINE (Left + 2, Top + 6)-STEP(4, 0), PrintColor
END IF
IF Letter = "F" THEN
LINE (Left + 1, Top)-STEP(1, 6), PrintColor, B
LINE (Left + 3, Top)-STEP(3, 0), PrintColor
LINE (Left + 3, Top + 3)-STEP(1, 0), PrintColor
END IF
IF Letter = "G" THEN
LINE (Left + 2, Top)-STEP(3, 0), PrintColor
LINE (Left + 1, Top + 1)-STEP(1, 0), PrintColor
LINE (Left + 5, Top + 1)-STEP(1, 0), PrintColor
LINE (Left, Top + 2)-STEP(1, 2), PrintColor, B
LINE (Left + 1, Top + 5)-STEP(1, 0), PrintColor
LINE (Left + 2, Top + 6)-STEP(4, 0), PrintColor
LINE (Left + 5, Top + 4)-STEP(1, 1), PrintColor, B
PSET (Left + 4, Top + 4), PrintColor
END IF
IF Letter = "H" THEN
LINE (Left, Top)-STEP(1, 6), PrintColor, B
LINE (Left + 4, Top)-STEP(1, 6), PrintColor, B
LINE (Left + 2, Top + 3)-STEP(1, 0), PrintColor
END IF
IF Letter = "I" THEN
LINE (Left + 1, Top)-STEP(3, 0), PrintColor
LINE (Left + 1, Top + 6)-STEP(3, 0), PrintColor
LINE (Left + 2, Top + 1)-STEP(1, 4), PrintColor, B
END IF
IF Letter = "J" THEN
LINE (Left + 3, Top)-STEP(3, 0), PrintColor
LINE (Left + 4, Top + 1)-STEP(1, 4), PrintColor, B
LINE (Left, Top + 4)-STEP(1, 1), PrintColor, B
LINE (Left + 1, Top + 6)-STEP(3, 0), PrintColor
END IF
IF Letter = "K" THEN
LINE (Left + 1, Top)-STEP(1, 6), PrintColor, B
PSET (Left, Top), PrintColor
PSET (Left, Top + 6), PrintColor
LINE (Left + 3, Top + 3)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 2)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 4)-STEP(1, 0), PrintColor
LINE (Left + 5, Top)-STEP(1, 1), PrintColor, B
LINE (Left + 5, Top + 5)-STEP(1, 1), PrintColor, B
END IF
IF Letter = "L" THEN
LINE (Left + 1, Top)-STEP(1, 6), PrintColor, B
LINE (Left + 3, Top + 6)-STEP(3, 0), PrintColor
END IF
IF Letter = "M" THEN
LINE (Left, Top)-STEP(1, 6), PrintColor, B
LINE (Left + 5, Top)-STEP(1, 6), PrintColor, B
LINE (Left + 2, Top + 1)-STEP(0, 2), PrintColor
LINE (Left + 3, Top + 2)-STEP(0, 2), PrintColor
LINE (Left + 4, Top + 1)-STEP(0, 2), PrintColor
END IF
IF Letter = "N" THEN
LINE (Left, Top)-STEP(1, 6), PrintColor, B
LINE (Left + 5, Top)-STEP(1, 6), PrintColor, B
LINE (Left + 2, Top + 1)-STEP(2, 2), PrintColor
LINE (Left + 2, Top + 2)-STEP(2, 2), PrintColor
END IF
IF Letter = "O" THEN
LINE (Left + 3, Top)-STEP(-3, 2), PrintColor
LINE (Left + 4, Top)-STEP(2, 2), PrintColor
LINE (Left + 3, Top + 6)-STEP(-3, -2), PrintColor
LINE (Left + 4, Top + 6)-STEP(2, -2), PrintColor
LINE (Left + 2, Top + 1)-STEP(-1, 1), PrintColor
LINE (Left + 4, Top + 1)-STEP(1, 1), PrintColor
LINE (Left + 2, Top + 5)-STEP(-1, -1), PrintColor
LINE (Left + 4, Top + 5)-STEP(1, -1), PrintColor
LINE (Left, Top + 3)-STEP(1, 0), PrintColor
LINE (Left + 5, Top + 3)-STEP(1, 0), PrintColor
END IF
IF Letter = "P" THEN
LINE (Left, Top)-STEP(5, 0), PrintColor
LINE (Left + 1, Top + 1)-STEP(1, 4), PrintColor, B
LINE (Left, Top + 6)-STEP(3, 0), PrintColor
LINE (Left + 5, Top + 1)-STEP(1, 1), PrintColor, B
LINE (Left + 3, Top + 3)-STEP(2, 0), PrintColor
END IF
IF Letter = "Q" THEN
LINE (Left + 1, Top)-STEP(3, 0), PrintColor
LINE (Left, Top + 1)-STEP(1, 3), PrintColor, B
LINE (Left + 4, Top + 1)-STEP(1, 3), PrintColor, B
PSET (Left + 3, Top + 4), PrintColor
LINE (Left + 1, Top + 5)-STEP(3, 0), PrintColor
LINE (Left + 3, Top + 6)-STEP(2, 0), PrintColor
END IF
IF Letter = "R" THEN
LINE (Left, Top)-STEP(5, 0), PrintColor
LINE (Left + 1, Top + 1)-STEP(1, 4), PrintColor, B
LINE (Left, Top + 6)-STEP(2, 0), PrintColor
LINE (Left + 5, Top + 1)-STEP(1, 1), PrintColor, B
LINE (Left + 3, Top + 3)-STEP(2, 0), PrintColor
LINE (Left + 4, Top + 4)-STEP(1, 0), PrintColor
LINE (Left + 5, Top + 5)-STEP(1, 1), PrintColor, B
END IF
IF Letter = "S" THEN
LINE (Left + 1, Top)-STEP(3, 0), PrintColor
LINE (Left, Top + 1)-STEP(1, 1), PrintColor, B
LINE (Left + 4, Top + 1)-STEP(1, 0), PrintColor
PSET (Left + 2, Top + 2), PrintColor
LINE (Left + 1, Top + 3)-STEP(2, 0), PrintColor
LINE (Left + 3, Top + 4)-STEP(2, 0), PrintColor
LINE (Left, Top + 5)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 5)-STEP(1, 0), PrintColor
LINE (Left + 1, Top + 6)-STEP(3, 0), PrintColor
END IF
IF Letter = "T" THEN
LINE (Left, Top)-STEP(5, 0), PrintColor
LINE (Left + 2, Top + 1)-STEP(1, 5), PrintColor, B
END IF
IF Letter = "U" THEN
LINE (Left, Top)-STEP(1, 5), PrintColor, B
LINE (Left + 4, Top)-STEP(1, 5), PrintColor, B
LINE (Left, Top + 6)-STEP(5, 0), PrintColor
END IF
IF Letter = "V" THEN
LINE (Left, Top)-STEP(1, 4), PrintColor, B
LINE (Left + 4, Top)-STEP(1, 4), PrintColor, B
LINE (Left + 1, Top + 5)-STEP(3, 0), PrintColor
LINE (Left + 2, Top + 6)-STEP(1, 0), PrintColor
END IF
IF Letter = "W" THEN
LINE (Left, Top)-STEP(1, 6), PrintColor, B
LINE (Left + 5, Top)-STEP(1, 6), PrintColor, B
LINE (Left + 2, Top + 4)-STEP(0, 1), PrintColor
LINE (Left + 4, Top + 4)-STEP(0, 1), PrintColor
LINE (Left + 3, Top + 3)-STEP(0, 1), PrintColor
END IF
IF Letter = "X" THEN
LINE (Left, Top)-STEP(1, 1), PrintColor, B
LINE (Left + 5, Top)-STEP(1, 1), PrintColor, B
LINE (Left + 1, Top + 2)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 2)-STEP(1, 0), PrintColor
LINE (Left + 2, Top + 3)-STEP(2, 1), PrintColor, B
LINE (Left + 1, Top + 5)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 5)-STEP(1, 0), PrintColor
LINE (Left, Top + 6)-STEP(1, 0), PrintColor
LINE (Left + 5, Top + 6)-STEP(1, 0), PrintColor
END IF
IF Letter = "Y" THEN
LINE (Left, Top)-STEP(1, 2), PrintColor, B
LINE (Left + 4, Top)-STEP(1, 2), PrintColor, B
LINE (Left + 1, Top + 3)-STEP(3, 0), PrintColor
LINE (Left + 2, Top + 4)-STEP(1, 1), PrintColor, B
LINE (Left + 1, Top + 6)-STEP(3, 0), PrintColor
END IF
IF Letter = "Z" THEN
LINE (Left, Top)-STEP(6, 0), PrintColor
LINE (Left + 5, Top + 1)-STEP(-4, 4), PrintColor
LINE (Left + 6, Top + 1)-STEP(-4, 4), PrintColor
LINE (Left, Top + 6)-STEP(6, 0), PrintColor
END IF
IF Letter = "a" THEN
LINE (Left + 1, Top + 2)-STEP(3, 0), PrintColor
LINE (Left + 4, Top + 3)-STEP(1, 2), PrintColor, B
LINE (Left + 1, Top + 4)-STEP(2, 0), PrintColor
LINE (Left, Top + 5)-STEP(1, 0), PrintColor
LINE (Left + 1, Top + 6)-STEP(2, 0), PrintColor
LINE (Left + 5, Top + 6)-STEP(1, 0), PrintColor
END IF
IF Letter = "b" THEN
PSET (Left, Top), PrintColor
LINE (Left + 1, Top)-STEP(1, 5), PrintColor, B
LINE (Left, Top + 6)-STEP(1, 0), PrintColor
LINE (Left + 3, Top + 3)-STEP(2, 0), PrintColor
LINE (Left + 3, Top + 6)-STEP(2, 0), PrintColor
LINE (Left + 5, Top + 4)-STEP(1, 1), PrintColor, B
END IF
IF Letter = "c" THEN
LINE (Left + 1, Top + 2)-STEP(3, 0), PrintColor
LINE (Left, Top + 3)-STEP(1, 2), PrintColor, B
LINE (Left + 4, Top + 3)-STEP(1, 0), PrintColor
LINE (Left + 1, Top + 6)-STEP(3, 0), PrintColor
LINE (Left + 4, Top + 5)-STEP(1, 0), PrintColor
END IF
IF Letter = "d" THEN
PSET (Left + 3, Top), PrintColor
LINE (Left + 4, Top)-STEP(1, 5), PrintColor, B
LINE (Left + 1, Top + 3)-STEP(2, 0), PrintColor
LINE (Left, Top + 4)-STEP(1, 1), PrintColor, B
LINE (Left + 1, Top + 6)-STEP(2, 0), PrintColor
LINE (Left + 5, Top + 6)-STEP(1, 0), PrintColor
END IF
IF Letter = "e" THEN
LINE (Left + 1, Top + 2)-STEP(3, 0), PrintColor
LINE (Left, Top + 3)-STEP(1, 2), PrintColor, B
LINE (Left + 4, Top + 3)-STEP(1, 1), PrintColor, B
LINE (Left + 2, Top + 4)-STEP(1, 0), PrintColor
LINE (Left + 1, Top + 6)-STEP(3, 0), PrintColor
END IF
IF Letter = "f" THEN
LINE (Left + 2, Top)-STEP(2, 0), PrintColor
LINE (Left + 4, Top + 1)-STEP(1, 0), PrintColor
LINE (Left + 1, Top + 1)-STEP(1, 4), PrintColor, B
PSET (Left, Top + 3), PrintColor
PSET (Left + 3, Top + 3), PrintColor
LINE (Left, Top + 6)-STEP(3, 0), PrintColor
END IF
IF Letter = "g" THEN
LINE (Left + 1, Top + 2)-STEP(2, 0), PrintColor
LINE (Left + 5, Top + 2)-STEP(1, 0), PrintColor
LINE (Left, Top + 3)-STEP(1, 1), PrintColor, B
LINE (Left + 1, Top + 5)-STEP(2, 0), PrintColor
LINE (Left + 4, Top + 3)-STEP(1, 3), PrintColor, B
LINE (Left, Top + 7)-STEP(4, 0), PrintColor
END IF
IF Letter = "h" THEN
PSET (Left, Top), PrintColor
LINE (Left + 1, Top)-STEP(1, 6), PrintColor, B
PSET (Left, Top + 6), PrintColor
PSET (Left + 3, Top + 3), PrintColor
LINE (Left + 4, Top + 2)-STEP(1, 0), PrintColor
LINE (Left + 5, Top + 3)-STEP(1, 3), PrintColor, B
END IF
IF Letter = "i" THEN
LINE (Left + 2, Top)-STEP(1, 0), PrintColor
PSET (Left + 1, Top + 2), PrintColor
LINE (Left + 2, Top + 2)-STEP(1, 3), PrintColor, B
LINE (Left + 1, Top + 6)-STEP(3, 0), PrintColor
END IF
IF Letter = "j" THEN
LINE (Left + 4, Top)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 2)-STEP(1, 4), PrintColor, B
LINE (Left, Top + 5)-STEP(1, 1), PrintColor, B
LINE (Left + 1, Top + 7)-STEP(3, 0), PrintColor
END IF
IF Letter = "k" THEN
PSET (Left, Top), PrintColor
PSET (Left, Top + 6), PrintColor
LINE (Left + 1, Top)-STEP(1, 6), PrintColor, B
LINE (Left + 3, Top + 4)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 3)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 5)-STEP(1, 0), PrintColor
LINE (Left + 5, Top + 2)-STEP(1, 0), PrintColor
LINE (Left + 5, Top + 6)-STEP(1, 0), PrintColor
END IF
IF Letter = "l" THEN
PSET (Left + 1, Top), PrintColor
LINE (Left + 2, Top)-STEP(1, 5), PrintColor, B
LINE (Left + 1, Top + 6)-STEP(3, 0), PrintColor
END IF
IF Letter = "m" THEN
LINE (Left + 1, Top + 2)-STEP(1, 0), PrintColor
LINE (Left, Top + 3)-STEP(1, 3), PrintColor, B
LINE (Left + 5, Top + 3)-STEP(1, 3), PrintColor, B
LINE (Left + 4, Top + 2)-STEP(1, 0), PrintColor
LINE (Left + 2, Top + 3)-STEP(2, 1), PrintColor, B
PSET (Left + 3, Top + 5), PrintColor
END IF
IF Letter = "n" THEN
LINE (Left, Top + 2)-STEP(4, 0), PrintColor
LINE (Left, Top + 3)-STEP(1, 3), PrintColor, B
LINE (Left + 4, Top + 3)-STEP(1, 3), PrintColor, B
END IF
IF Letter = "o" THEN
LINE (Left + 1, Top + 2)-STEP(3, 0), PrintColor
LINE (Left, Top + 3)-STEP(1, 2), PrintColor, B
LINE (Left + 4, Top + 3)-STEP(1, 2), PrintColor, B
LINE (Left + 1, Top + 6)-STEP(3, 0), PrintColor
END IF
IF Letter = "p" THEN
LINE (Left, Top + 2)-STEP(1, 0), PrintColor
LINE (Left + 1, Top + 3)-STEP(1, 3), PrintColor, B
LINE (Left, Top + 7)-STEP(3, 0), PrintColor
LINE (Left + 3, Top + 2)-STEP(2, 0), PrintColor
LINE (Left + 5, Top + 3)-STEP(1, 1), PrintColor, B
LINE (Left + 3, Top + 5)-STEP(2, 0), PrintColor
END IF
IF Letter = "q" THEN
LINE (Left + 1, Top + 2)-STEP(2, 0), PrintColor
LINE (Left + 5, Top + 2)-STEP(1, 0), PrintColor
LINE (Left, Top + 3)-STEP(1, 1), PrintColor, B
LINE (Left + 1, Top + 5)-STEP(2, 0), PrintColor
LINE (Left + 4, Top + 3)-STEP(1, 3), PrintColor, B
LINE (Left + 3, Top + 7)-STEP(3, 0), PrintColor
END IF
IF Letter = "r" THEN
LINE (Left, Top + 2)-STEP(1, 0), PrintColor
LINE (Left + 3, Top + 2)-STEP(2, 0), PrintColor
LINE (Left + 1, Top + 3)-STEP(1, 2), PrintColor, B
PSET (Left + 3, Top + 3), PrintColor
LINE (Left + 5, Top + 3)-STEP(1, 1), PrintColor, B
LINE (Left, Top + 6)-STEP(3, 0), PrintColor
END IF
IF Letter = "s" THEN
LINE (Left + 1, Top + 2)-STEP(4, 0), PrintColor
LINE (Left, Top + 3)-STEP(1, 0), PrintColor
LINE (Left + 1, Top + 4)-STEP(3, 0), PrintColor
LINE (Left + 4, Top + 5)-STEP(1, 0), PrintColor
LINE (Left, Top + 6)-STEP(4, 0), PrintColor
END IF
IF Letter = "t" THEN
LINE (Left + 2, Top + 1)-STEP(0, 4), PrintColor
LINE (Left + 3, Top)-STEP(0, 5), PrintColor
PSET (Left + 1, Top + 2), PrintColor
LINE (Left + 4, Top + 2)-STEP(1, 0), PrintColor
PSET (Left + 5, Top + 5), PrintColor
LINE (Left + 3, Top + 6)-STEP(1, 0), PrintColor
END IF
IF Letter = "u" THEN
LINE (Left, Top + 2)-STEP(1, 3), PrintColor, B
LINE (Left + 4, Top + 2)-STEP(1, 3), PrintColor, B
LINE (Left + 1, Top + 6)-STEP(2, 0), PrintColor
LINE (Left + 5, Top + 6)-STEP(1, 0), PrintColor
END IF
IF Letter = "v" THEN
LINE (Left, Top + 2)-STEP(1, 2), PrintColor, B
LINE (Left + 4, Top + 2)-STEP(1, 2), PrintColor, B
LINE (Left + 1, Top + 5)-STEP(3, 0), PrintColor
LINE (Left + 2, Top + 6)-STEP(1, 0), PrintColor
END IF
IF Letter = "w" THEN
LINE (Left, Top + 2)-STEP(1, 3), PrintColor, B
LINE (Left + 5, Top + 2)-STEP(1, 3), PrintColor, B
PSET (Left + 3, Top + 3), PrintColor
LINE (Left + 2, Top + 4)-STEP(2, 1), PrintColor, B
LINE (Left + 1, Top + 6)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 6)-STEP(1, 0), PrintColor
END IF
IF Letter = "x" THEN
LINE (Left, Top + 2)-STEP(1, 0), PrintColor
LINE (Left + 5, Top + 2)-STEP(1, 0), PrintColor
LINE (Left + 1, Top + 3)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 3)-STEP(1, 0), PrintColor
LINE (Left + 2, Top + 4)-STEP(2, 0), PrintColor
LINE (Left + 1, Top + 5)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 5)-STEP(1, 0), PrintColor
LINE (Left, Top + 6)-STEP(1, 0), PrintColor
LINE (Left + 5, Top + 6)-STEP(1, 0), PrintColor
END IF
IF Letter = "y" THEN
LINE (Left, Top + 2)-STEP(1, 2), PrintColor, B
LINE (Left + 4, Top + 2)-STEP(1, 4), PrintColor, B
LINE (Left + 1, Top + 5)-STEP(2, 0), PrintColor
LINE (Left, Top + 7)-STEP(4, 0), PrintColor
END IF
IF Letter = "z" THEN
LINE (Left, Top + 2)-STEP(5, 0), PrintColor
PSET (Left, Top + 3), PrintColor
LINE (Left + 3, Top + 3)-STEP(-2, 2), PrintColor
LINE (Left + 4, Top + 3)-STEP(-2, 2), PrintColor
PSET (Left + 5, Top + 5), PrintColor
LINE (Left, Top + 6)-STEP(5, 0), PrintColor
END IF
IF Letter = "0" THEN
LINE (Left + 1, Top)-STEP(4, 0), PrintColor
LINE (Left, Top + 1)-STEP(1, 4), PrintColor, B
LINE (Left + 5, Top + 1)-STEP(1, 4), PrintColor, B
LINE (Left + 4, Top + 2)-STEP(0, 1), PrintColor
LINE (Left + 3, Top + 3)-STEP(0, 1), PrintColor
LINE (Left + 2, Top + 4)-STEP(0, 1), PrintColor
LINE (Left + 1, Top + 6)-STEP(4, 0), PrintColor
END IF
IF Letter = "1" THEN
LINE (Left + 2, Top)-STEP(1, 5), PrintColor, B
PSET (Left + 1, Top + 1), PrintColor
LINE (Left, Top + 6)-STEP(5, 0), PrintColor
END IF
IF Letter = "2" THEN
LINE (Left + 1, Top)-STEP(3, 0), PrintColor
LINE (Left, Top + 1)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 1)-STEP(1, 1), PrintColor, B
LINE (Left + 2, Top + 3)-STEP(2, 0), PrintColor
LINE (Left + 1, Top + 4)-STEP(1, 0), PrintColor
LINE (Left, Top + 5)-STEP(1, 1), PrintColor, B
LINE (Left + 2, Top + 6)-STEP(3, 0), PrintColor
LINE (Left + 4, Top + 5)-STEP(1, 0), PrintColor
END IF
IF Letter = "3" THEN
LINE (Left + 1, Top)-STEP(3, 0), PrintColor
LINE (Left, Top + 1)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 1)-STEP(1, 1), PrintColor, B
LINE (Left + 2, Top + 3)-STEP(2, 0), PrintColor
LINE (Left + 4, Top + 4)-STEP(1, 1), PrintColor, B
LINE (Left, Top + 5)-STEP(1, 0), PrintColor
LINE (Left + 1, Top + 6)-STEP(3, 0), PrintColor
END IF
IF Letter = "4" THEN
PSET (Left + 3, Top), PrintColor
LINE (Left + 2, Top + 1)-STEP(1, 0), PrintColor
LINE (Left + 1, Top + 2)-STEP(1, 0), PrintColor
LINE (Left, Top + 3)-STEP(1, 0), PrintColor
LINE (Left + 4, Top)-STEP(1, 5), PrintColor, B
LINE (Left, Top + 4)-STEP(3, 0), PrintColor
PSET (Left + 6, Top + 4), PrintColor
LINE (Left + 3, Top + 6)-STEP(3, 0), PrintColor
END IF
IF Letter = "5" THEN
LINE (Left, Top)-STEP(5, 0), PrintColor
LINE (Left, Top + 1)-STEP(1, 1), PrintColor, B
LINE (Left + 2, Top + 2)-STEP(2, 0), PrintColor
LINE (Left + 4, Top + 3)-STEP(1, 2), PrintColor, B
LINE (Left, Top + 5)-STEP(1, 0), PrintColor
LINE (Left + 1, Top + 6)-STEP(3, 0), PrintColor
END IF
IF Letter = "6" THEN
LINE (Left + 2, Top)-STEP(2, 0), PrintColor
LINE (Left + 1, Top + 1)-STEP(1, 0), PrintColor
LINE (Left, Top + 2)-STEP(1, 3), PrintColor, B
LINE (Left + 2, Top + 3)-STEP(2, 0), PrintColor
LINE (Left + 4, Top + 4)-STEP(1, 1), PrintColor, B
LINE (Left + 1, Top + 6)-STEP(3, 0), PrintColor
END IF
IF Letter = "7" THEN
LINE (Left, Top)-STEP(5, 0), PrintColor
LINE (Left, Top + 1)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 1)-STEP(1, 1), PrintColor, B
LINE (Left + 3, Top + 3)-STEP(1, 0), PrintColor
LINE (Left + 2, Top + 4)-STEP(1, 2), PrintColor, B
END IF
IF Letter = "8" THEN
LINE (Left + 1, Top)-STEP(3, 0), PrintColor
LINE (Left, Top + 1)-STEP(1, 1), PrintColor, B
LINE (Left + 4, Top + 1)-STEP(1, 1), PrintColor, B
LINE (Left + 1, Top + 3)-STEP(3, 0), PrintColor
LINE (Left, Top + 4)-STEP(1, 1), PrintColor, B
LINE (Left + 4, Top + 4)-STEP(1, 1), PrintColor, B
LINE (Left + 1, Top + 6)-STEP(3, 0), PrintColor
END IF
IF Letter = "9" THEN
LINE (Left + 1, Top)-STEP(3, 0), PrintColor
LINE (Left, Top + 1)-STEP(1, 1), PrintColor, B
LINE (Left + 4, Top + 1)-STEP(1, 3), PrintColor, B
LINE (Left + 1, Top + 3)-STEP(2, 0), PrintColor, B
LINE (Left + 3, Top + 5)-STEP(1, 0), PrintColor
LINE (Left + 1, Top + 6)-STEP(2, 0), PrintColor
END IF
IF Letter = "." THEN
LINE (Left + 2, Top + 5)-STEP(1, 1), PrintColor, B
END IF
IF Letter = "," THEN
LINE (Left + 2, Top + 5)-STEP(1, 1), PrintColor, B
LINE (Left + 1, Top + 7)-STEP(1, 0), PrintColor
END IF
IF Letter = ":" THEN
LINE (Left + 2, Top + 1)-STEP(1, 1), PrintColor, B
LINE (Left + 2, Top + 5)-STEP(1, 1), PrintColor, B
END IF
IF Letter = ";" THEN
LINE (Left + 2, Top + 1)-STEP(1, 1), PrintColor, B
LINE (Left + 2, Top + 5)-STEP(1, 1), PrintColor, B
LINE (Left + 1, Top + 7)-STEP(1, 0), PrintColor
END IF
IF Letter = "(" THEN
LINE (Left + 3, Top)-STEP(1, 0), PrintColor
LINE (Left + 2, Top + 1)-STEP(1, 0), PrintColor
LINE (Left + 1, Top + 2)-STEP(1, 2), PrintColor, B
LINE (Left + 2, Top + 5)-STEP(1, 0), PrintColor
LINE (Left + 3, Top + 6)-STEP(1, 0), PrintColor
END IF
IF Letter = ")" THEN
LINE (Left + 1, Top)-STEP(1, 0), PrintColor
LINE (Left + 2, Top + 1)-STEP(1, 0), PrintColor
LINE (Left + 3, Top + 2)-STEP(1, 2), PrintColor, B
LINE (Left + 2, Top + 5)-STEP(1, 0), PrintColor
LINE (Left + 1, Top + 6)-STEP(1, 0), PrintColor
END IF
IF Letter = "!" THEN
LINE (Left + 1, Top + 1)-STEP(0, 2), PrintColor
LINE (Left + 2, Top)-STEP(1, 4), PrintColor, B
LINE (Left + 4, Top + 1)-STEP(0, 2), PrintColor
LINE (Left + 2, Top + 6)-STEP(1, 0), PrintColor
END IF
IF Letter = "?" THEN
LINE (Left + 1, Top)-STEP(3, 0), PrintColor
LINE (Left, Top + 1)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 1)-STEP(1, 1), PrintColor, B
LINE (Left + 3, Top + 3)-STEP(1, 0), PrintColor
LINE (Left + 2, Top + 4)-STEP(1, 0), PrintColor
LINE (Left + 2, Top + 6)-STEP(1, 0), PrintColor
END IF
IF Letter = "`" THEN
LINE (Left + 2, Top)-STEP(1, 1), PrintColor, B
LINE (Left + 3, Top + 2)-STEP(1, 0), PrintColor
END IF
IF Letter = "'" THEN
LINE (Left + 1, Top)-STEP(1, 1), PrintColor, B
LINE (Left, Top + 2)-STEP(1, 0), PrintColor
END IF
IF Letter = "+" THEN
LINE (Left + 2, Top + 1)-STEP(1, 4), PrintColor, B
LINE (Left, Top + 3)-STEP(1, 0), PrintColor
LINE (Left + 4, Top + 3)-STEP(1, 0), PrintColor
END IF
IF Letter = "-" THEN
LINE (Left, Top + 3)-STEP(5, 0), PrintColor
END IF
IF Letter = "*" THEN
LINE (Left + 2, Top + 2)-STEP(2, 2), PrintColor, BF
PSET (Left + 1, Top + 1), PrintColor
PSET (Left + 5, Top + 1), PrintColor
PSET (Left + 1, Top + 3), PrintColor
PSET (Left + 5, Top + 3), PrintColor
PSET (Left + 1, Top + 5), PrintColor
PSET (Left + 5, Top + 5), PrintColor
END IF
IF Letter = "/" THEN
LINE (Left, Top + 5)-STEP(5, -5), PrintColor
LINE (Left, Top + 6)-STEP(6, -6), PrintColor
END IF
IF Letter = "=" THEN
LINE (Left, Top + 2)-STEP(5, 0), PrintColor
LINE (Left, Top + 5)-STEP(5, 0), PrintColor
END IF
Left = Left + 8
NEXT i
END IF
IF FunctionNum = 1 THEN
Left = VAL(Variable1)
Top = VAL(Variable2)
END IF
IF FunctionNum = 2 THEN PrintColor = VAL(Variable1)
END SUB
As you can see, I didn't even go with a chained IF... it's just a bunch of IF statements in a row. No, this code is not under copyright. Feel free to use it yourself.
|