Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ASCII?
#1
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 :???:
Reply
#2
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.
Reply
#3
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
Reply
#4
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.
Reply
#5
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.
Reply
#6
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]
Reply
#7
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. Smile
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.
Reply
#8
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:
Reply
#9
Oh, no prob. Big Grin 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]
Reply
#10
*turns head* huh? huh? did somebody say the magic acronym??

http://qbasicnews.com/qboho/qckfor.shtml
http://qbasicnews.com/qboho/qckasc.shtml
http://qbasicnews.com/qboho/qckchr$.shtml

wheeee!!
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)