TGC Codebase Backup



ASCII Display by Webber

7th Sep 2011 17:53
Summary

Displays ASCII characters 0-255



Description

Not a complex program, displays ASCII characters, and could be useful if you want to display text that you couldn't before.

For example #34 could be useful "If you know what I mean"
ASCII characters are cool!

The display uses the font Arial, you could experiment with other fonts if you want.

Credit would be appreciated, but is not required.



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    `Project: ASCII Display
`Author: The Game Guy

Rem Set up text display
set text font "Arial"
set text to bold
set text size 16

Rem Display all of the ASCII characters 0-255
for j = 1 to 8 `split the ASCII characters into 8 rows
	Num1 = 32*(j-1) `The starter number in each row of ASCII characters
	Num2 = 32*j-1   `The last number in each row of ASCII characters
	for i = Num1 to Num2 `For loop For each row of ASCII characters
		string$ = str$(i)+": "+CHR$(i) `Gets the number and the ASCII character
		text j*80-80+20,i*14-Num1*14+14,string$ `Displays Text
	next i
next j

wait key `Exits when the user presses a key