menu paradigm of Rev/MC and other goofiness -- like quotes

Richard Gaskin ambassador at fourthworld.com
Fri Feb 28 06:06:01 EST 2003


Ben Rubinstein wrote:

>>> That helps, but look how much easier this is to read and debug:
>>> 
>>> put "I said, 'Let's go!'"
>> 
>> I believe there are contexts in which a string literal can have quote
>> marks.  I don't know what they all are.
> 
> FWIW, my equivalent of Richard's standard "q" script is this, which tends to
> end up in the mainstack script of many of my projects.
> 
> function encTQR t --> t
> replace "" with tab in t
> replace "`" with quote in t
> replace "¶" with return in t
> return t
> end encTQR
> 
> Needless to say, I develop on the Mac; not sure how this would play on
> Windows.  In case this hasn't survived email, the three characters are delta
> (option-J), 'backwards apostrophe' (under the tilde key on most keyboards)
> and paragraph symbol (option-7).
> 
> Hence I can say
> put encTQR("He said `What is this 'Revolution' of which you speak?`")
> or
> put encTQR("idmailing namesortnameaddress¶") into datafile
> or
> put encTQR("<html>¶<head>¶<title>the title</title>¶</head>¶") into t
> etc...

You may enjoy the format function also - from the MC 2.4.3 Read Me:

  A format() function has been added with a syntax compatible with
  the C printf function.  This is most useful for padding strings
  with spaces, or controlling the format of numbers with more
  flexibility than is possible with the numberFormat property.


-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.2: Publish any database on any site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the use-livecode mailing list