The QUOTE character ' ' [Resolved]

Just starting out? Need help? Post your questions and find answers here.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

The QUOTE character ' ' [Resolved]

Post by Kwai chang caine »

Hello at all

Someone can explain to me what is the function of QUOTES ''

When i write :

Code: Select all

Debug '0'
The return is 48
Here i say to me ...it's easy...it's the ASCII value of zero :mrgreen:

I'm again more sure when i write :

Code: Select all

Debug '1'
The return is 49 :D

So when i write :

Code: Select all

Debug '01'

I obtain 12337

What is this number of another planet ??? :shock:

Thanks and good day
Last edited by Kwai chang caine on Fri May 06, 2011 1:01 pm, edited 1 time in total.
ImageThe happiness is a road...
Not a destination
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: The QUOTE character ' '

Post by Trond »

Kwaï chang caïne wrote: So when i write :

Code: Select all

Debug '01'

I obtain 12337

What is this number of another planet ??? :shock:

Thanks and good day
It is the asci value of 0 and 1 put into a word-sized variable (two characters = two bytes = word).

Code: Select all



Debug '01'

word.w

*a.Ascii = @word
*a\a = '1' ; BEcause Intel is little-endian, the last value goes first, so '01' is stored as first '1'
*a + 1
*a\a = '0' ; and then '0'

Debug word ; it's the same!


User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: The QUOTE character ' ' [Resolved]

Post by Kwai chang caine »

This time it's when even a little bit more difficult to understand :oops:
But i reflect all the day, and perhaps a light appear in my little head :mrgreen:

In fact there are a long time ago, you give to me the super tips to translate text to number the most simple possible 8)
For do this, you say to me : "Kcc use quote"

Code: Select all

a.q = 'Kcc'
Debug a
http://www.purebasic.fr/english/viewtop ... 71#p332171

It's just a pity i'm forced to only 8 characters between the 'Quote' :(

And i have follow your precious explanation.
I have create numerous constant with big numbers equal to text

And today..impossible to remember how translate the number to text :mrgreen:

Since three hour i search a way for decoding my personal "coding" :? :lol: :lol:
I'm really a mule :oops:

So now, thanks again at you, i have retrieve my eggs :mrgreen:

Code: Select all

Procedure.s FunctionOfTheDead(V.q)
 ProcedureReturn ReverseString(PeekS(@V, 8))
EndProcedure
 
a.q = 'KccMule'
Debug a
Debug FunctionOfTheDead(a)
TROND...you know i love you ??? :mrgreen:

I wish you the very very best good day of the world 8)
ImageThe happiness is a road...
Not a destination
Post Reply