Thursday, January 19, 2017
  • Index
  •  » Core Language
  •  » What is a continuation character and why is it used? It looks like: √?¬¨

#1 2005-10-12 07:34:51 am

julifos
Administrator
From: Malasa√Īa, Madrid
Registered: 2002-11-20
Posts: 2014

What is a continuation character and why is it used? It looks like: √?¬¨

The √?¬¨ is known as a continuation character. It is used to break long lines of script content into shorter lines, allowing it to fit in the active window.

When the continuation character is used to break long lines, making the script more readable, the script, when run, will treat the shortened lines as one line.

To insert the continuation character in a line, hold down the "Option" key and press "Return". Note that the continuation character cannot be used within a text string without breaking the string into multiple parts and using the concatenation character (&).

Example Script:

Applescript:

display dialog "This is an example of a long line which may need a continuation character for better readability in small script windows, or to avoid line wrapping problems in email messages."

display dialog "This is an example of a long line which may need" & √?¬¨
   " a continuation character for better readability in small script" & √?¬¨
   " windows, or to avoid line wrapping problems in email messages."

or...

Applescript:

set the_answer to text returned of √?¬¨
   (display dialog "Please enter a number between 1 and 100." default answer √?¬¨
       "33" buttons {"Cancel", "Continue"} default button √?¬¨
       "Continue" with icon 1 giving up after 60)

Offline

 
  • Index
  •  » Core Language
  •  » What is a continuation character and why is it used? It looks like: √?¬¨

Board footer

Powered by FluxBB

[ Generated in 0.088 seconds, 10 queries executed ]

RSS (new topics) RSS (active topics)