[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - invisible ampersands in MessageBox

invisible ampersands in MessageBox

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

invisible ampersands in MessageBox

Postby MarkB » Mon Jun 21, 2010 3:25 am

A little demo, in case it saves someone else some perplexity.

Code: Select all
{  Ampersands in MessageBox
{  PocoMail v4.8

{  A single ampersand in a string does not show up in a MessageBox.
{  Its effect is to underline the character that follows it.
MessageBox "A single ampersand in a string does not show up in a MessageBox.\nIts effect is to underline the character that follows it.\n\nA&W Root Beer"

{  But only the rightmost ampersand in the string has the underlining effect;
{  the others are merely invisible, unless doubled.
MessageBox "But only the rightmost ampersand in the string has the underlining\neffect; the others are merely invisible, unless doubled.\n\nA&W Root &B&e&e&r"

{  A backslash doesn't help.
MessageBox "You're thinking, \"All you need is a backslash!\"\n\nA backslash doesn't help: A\&W Root Beer"

{  To show an ampersand, double it.
MessageBox "To show an ampersand, double it: A&&W Root Beer"

{  Though it doesn't display in MessageBox, it's there.
{  (& is ASCII decimal 38.)
CharCount #len "B&B"
Char $ch 2 "B&B"
CharToInt #code $ch
AddStrings $t "Though it doesn't display in MessageBox, it's there.\n\nB&B: " #len " characters, the second one being ASCII " #code
MessageBox $t

{  Ampersands display normally in InputBox and in "dialog box with text" in filters.
InputBox $t "Ampersands in InputBox display normally: A&W Root Beer"
MarkB
Poco Enthusiast
 
Posts: 217
Joined: Mon Aug 09, 2004 1:31 am
Location: Canada

Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 3 guests

cron