What is the difference between a ' and a " ?

Ken Ray kray at sonsothunder.com
Fri Jun 25 23:10:18 EDT 2004


Alex, 

It's the ASCII value for the single quote ('). You see Rev will assume an
unquoted value as a string unless it is a variable, so:

  put numToChar(b)

is the same as

  put numToChar("b")

so long as b has not been assigned a value (thus making it a variable).

In your case, what apparently happened is that:

  put numToChar('a')

became the equivalent of

  put numToChar(')

or 

  put numtToChar("'")

HTH,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/


> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Alex Tweedly
> Sent: Friday, June 25, 2004 9:50 PM
> To: use-revolution at lists.runrev.com
> Subject: What is the difference between a ' and a " ?
> 
> 
> 
> I've just spent a long time puzzling over a stupid bug of mine.
> 
> I had written something like
> 
>    put (numToChar( charToNum('a') + something)
> 
> not knowing that 'a' is different from "a"
> 
> But even now that I know it, I can't find anything in the 
> documents to 
> explain what 'a' does mean.
> 
> Any clues for me, please ?
> 
> I suspect this will be a common mis-type for me in the first 
> couple of 
> months - so any way to make single quotes cause an 
> error/warning would be 
> helpful.
> 
> Thanks
> -- Alex Tweedly.
> 




More information about the use-livecode mailing list