the ampersand
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 24
- Joined: Tue Dec 04, 2007 7:02 pm
- Location: Saratoga Springs
the ampersand
I am writing a script that creates HTTP://... addresses and I need to write an ampersand ("&") but when I do this the script evaluates & as an operator. How can I insert an ampersand as a regular character into an argument?
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: the ampersand
The chartonum of "&" = 38
You can try (No tested)
put numtochar(38)
No tested
Best
Jean-Marc
You can try (No tested)
put numtochar(38)
No tested
Best
Jean-Marc
https://alternatic.ch
Re: the ampersand
Hi drOrganized,
sorry, don't get this?!
If the & is in quotes then it will be treated as a "regular" string like any other character.
What did you script so far?
Best
Klaus
sorry, don't get this?!
If the & is in quotes then it will be treated as a "regular" string like any other character.
What did you script so far?
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 9785
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: the ampersand
Interesting. This was the very reason that such chars as quotes were also given the status of a constant, so they could be embedded into a string without acting like, literally, quotes.
Ampersands have no such constant counterpart. This might be a good thing to send to Scotland.
Craig Newman
Ampersands have no such constant counterpart. This might be a good thing to send to Scotland.
Craig Newman
Re: the ampersand
Hi all,
good point, Craig!
However: & <> "&"
Anyway, we need to see the script, I am sure this is just a matter of correct syntax!
Best
Klaus
good point, Craig!
However: & <> "&"
Anyway, we need to see the script, I am sure this is just a matter of correct syntax!
Best
Klaus