Posts: 13
Threads: 4
Joined: Feb 2003
How do you get the ASCII numbers to print on the screen?
if done this way:
i = 000 to 127
it doesnt work obviously. These are the numbers of ASCII I am trying to get the program to recognise for its letters or symbols to be printed on screen. Please help this noob.
thx :???:
Posts: 704
Threads: 0
Joined: Dec 2002
a character, i.e., if you do
B = ASC("A")
B will be 65. Use CHR$ to return the character associated with an ascii value, i.e., if you do
C$ = CHR$(65)
C$ will be "A".
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 13
Threads: 4
Joined: Feb 2003
ok thx gonna try it and let you know.
so it will go like this:
C$ = CHRS$(27-127)
if I understood you correctly
I'll be back
Posts: 3,368
Threads: 195
Joined: Jan 2003
nope.
a$ = "a"
a% = 65 '(I think... er I know)
a% = ASC(a$)
a$ = CHR$(a%)
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
Posts: 704
Threads: 0
Joined: Dec 2002
Quote:ok thx gonna try it and let you know.
so it will go like this:
C$ = CHRS$(27-127)
if I understood you correctly
I'll be back
Well, first, it's just "CHR$" (no "S"), and second, I'm not sure what you're trying to do with the "27 - 127". ASCII/extended ASCII values are non-negative numbers between 0 and 255.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 749
Threads: 4
Joined: Jun 2002
He wants something like this, I think:
Code:
CLS
FOR I=27 TO 127
PRINT CHR$(I)
NEXT
Again, whispering:
R. T. F. M...
img]http://usuarios.vtr.net/~disaster/sigs/annoyizer.php[/img]
Posts: 704
Threads: 0
Joined: Dec 2002
Quote:He wants something like this, I think:
Code:
CLS
FOR I=27 TO 127
PRINT CHR$(I)
NEXT
Again, whispering: R. T. F. M...
After I posted that, it occurred to me that that might have been what he was doing and I just took a dash as a minus sign. So I came back to explain that QB's functions are generally single-valued and not quite as generically useful as that, but you beat me at the guessing game.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 13
Threads: 4
Joined: Feb 2003
Thank You All
sorry for not being clearer about the 27-127 which are the ASCII letters I want reconized, but as I learn more the better I will get at trying to explain myself.
Thx Again :bounce:
Posts: 749
Threads: 4
Joined: Jun 2002
Oh, no prob.
Good luck in your quest for the truth.
...but don't forget to R. T. F. M.
img]http://usuarios.vtr.net/~disaster/sigs/annoyizer.php[/img]
Posts: 2,020
Threads: 24
Joined: Jun 2002
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry