|
Post by wybiral on May 19, 2006 11:07:06 GMT -5
This tiny little program will let you find the ASC code as well as some of the special key codes (space, escape, backspace...).
Just highlite the character you want and it will show you the code!
dim k$ dim i dim x,y dim Cx,Cy dim oCx,oCy dim Char$ dim Map(50)(50)
Cx=1 Cy=1
color (255,255,255)
for y=1 to 13 for x=1 to 20 Locate x,y print chr$(i) Map(x)(y)=i i=i+1 next next
do
If Cx>20 then Cx=20 endif If Cy>13 then Cy=13 endif If Cx<1 then Cx=1 endif If Cy<1 then Cy=1 endif
Locate 0,20 color (0,255,0) Printr "ASC Code: "+Map(Cx)(Cy)+" " If Map(Cx)(Cy)=8 then Char$="BackSpace" elseIf Map(Cx)(Cy)=9 then Char$="Tab" elseIf Map(Cx)(Cy)=13 then Char$="Return" elseif Map(Cx)(Cy)=27 then Char$="Escape" elseif Map(Cx)(Cy)=32 then Char$="Space" else Char$=CHR$(Map(Cx)(Cy)) endif Printr "Character: "+CHAR$+" "
Locate Cx,Cy color (0,0,255) Print chr$(Map(Cx)(Cy))
if Cx<>oCx or Cy<>oCy then Locate oCx,oCy color (255,255,255) Print chr$(Map(oCx)(oCy)) endif
k$=InScanKey()
if k$=vk_left then oCx=Cx oCy=Cy Cx=Cx-1 elseif k$=vk_right then oCy=Cy oCx=Cx Cx=Cx+1 elseif k$=vk_up then oCy=Cy oCx=Cx Cy=Cy-1 elseif k$=vk_down then oCy=Cy oCx=Cx Cy=Cy+1 endif
loop
|
|
|
Post by James :) (aka Madcow) on May 19, 2006 14:30:44 GMT -5
whats asc?
|
|
|
Post by James :) (aka Madcow) on May 19, 2006 14:32:02 GMT -5
no wait i think i understand
|
|
|
Post by Centanoul on May 19, 2006 15:31:47 GMT -5
Asc is short for Ascii. ASCII (American Standard Code for Information Interchange), generally pronounced [ˈæski], is a character encoding based on the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that work with text. Most modern character encodings have a historical basis in ASCII.
ASCII was first published as a standard in 1967 and was last updated in 1986. It currently defines codes for 33 non-printing, mostly obsolete control characters that affect how text is processed, plus the following 95 printable characters (starting with the space character):
!"#$%&'()*+,-./0123456789:;<=>? @abcdefghijklmnopqrstuvwxyz[\]^_ `abcdefghijklmnopqrstuvwxyz{|}~
From: en.wikipedia.org/wiki/ASCIIVery nice Wybiral. I think this could be beneficial to the people that don't know the codes off the top of their head. (Some you get to know, like the arrow keys and such, from extended use.) So you all know, Ascii codes are not limited to one language, they are used in almost every language there is and are always the same number for the same code: www.asciitable.com/ is a list of all of them. P.S. Wybiral...you see that nice title of God next to your name? Means you talk to much. haha In the best of Jest, ~Cent
|
|