dbTalk Databases Forums  

Escape Character Problem

comp.databases.filemaker comp.databases.filemaker


Discuss Escape Character Problem in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
TomMcIn
 
Posts: n/a

Default Escape Character Problem - 01-19-2010 , 01:07 AM






I want to identify any fields that do not have a backslash \ as the
first character in the field. Some of the fields have two \s on the
left end.

If I test with Left ( Self ; 1 ) â‰* "\" FM complains there is no
ending quotation mark.
If I test with Left ( Self ; 1 ) â‰* "\\" FM shows fields with one\
as failing but two \s are OK
If I tests with Left ( Self ; 1 ) â‰* "\\\" FM complains there is no
ending quotation mark.

Suspect I have to substitute / for \ before testing the left
end.

Reply With Quote
  #2  
Old   
Ursus
 
Posts: n/a

Default Re: Escape Character Problem - 01-19-2010 , 01:56 PM






Riddle

if one \ escapes one \ how many \ do you need to escape two \?

"\" escapes the quotation mark and has thus no ending "
you don't need the " to be escaped, you need a \
"\\" results in 1 \ because only one \ gets escaped
"\\\"results in 1 \ and an escaped " without ending "
"\\\\" should result in 2 \\
If you are afraid you can't read it any more rewrite it as "\\" & "\\"

--
Keep well / Hou je goed

Ursus

"TomMcIn" <tom_mcintosh (AT) shaw (DOT) ca> schreef in bericht
news:478fd331-97f3-44bc-8da9-f01b7200daaf (AT) p8g2000yqb (DOT) googlegroups.com...
I want to identify any fields that do not have a backslash \ as the
first character in the field. Some of the fields have two \s on the
left end.

If I test with Left ( Self ; 1 ) ? "\" FM complains there is no
ending quotation mark.
If I test with Left ( Self ; 1 ) ? "\\" FM shows fields with one \
as failing but two \s are OK
If I tests with Left ( Self ; 1 ) ? "\\\" FM complains there is no
ending quotation mark.

Suspect I have to substitute / for \ before testing the left
end.

Reply With Quote
  #3  
Old   
Your Name
 
Posts: n/a

Default Re: Escape Character Problem - 01-19-2010 , 02:14 PM



"TomMcIn" <tom_mcintosh (AT) shaw (DOT) ca> wrote

Quote:
I want to identify any fields that do not have a backslash \ as the
first character in the field. Some of the fields have two \s on the
left end.

If I test with Left ( Self ; 1 ) ? "\" FM complains there is no
ending quotation mark.
If I test with Left ( Self ; 1 ) ? "\\" FM shows fields with one \
as failing but two \s are OK
If I tests with Left ( Self ; 1 ) ? "\\\" FM complains there is no
ending quotation mark.

Suspect I have to substitute / for \ before testing the left
end.
The easiest way around these untypeable and problem characters (including
backslash, quotation mark, tab, etc.) is to use a Global Field to store one.

- Create a Global Field:
g_Backslash Global Text

- Temporarily put this Field in any Layout's Body
part, and in Browse mode type a / into it, then
you can remove the Frield from the Layout again.

- Now your If command simply becomes:
If (Left (Self; 1) ? g_Backslash)


Helpfull Harry )

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.