Text Inside Single Quotation Marks

Prev Next

Introduction

Text inside single quotation marks can be used for

Rules

  • Use single quotation marks (apostrophes) ' ... ' to enclose the text.
  • Inside the quotation marks, all characters are fine, except the single quotation mark which delimits the text.
  • All white spaces inside the text inside quoatation marks are preserved.
    • Example 1: 'Hello   World' is not equal to 'Hello World'
    • Example 2: 'Hello World' is not equal to ' Hello World '
  • The text must fit on the same line.
    • Exception: Use Multi-line text using 3 consecutive quotation marks ''' (apostrophes) as delimiatersto formulate a text requiring multiple lines.
  • Reserved keywords inside quotation marks are treated as text, e.g. 'true'.
  • Various functions and comparisons support wildcard symbols
    • Example 1: ABC = 'A*' returns true.
  • Character entities like € or € for the EURO symbol € are supported. They are converted quasi at compile time to target characters.
  • If the text is assigned to B4P variables, then the variable assumes the subtype softquoted string.

Examples
  echo( 'Hello World' );
  echo( '  Hello   World  ' );
  echo( 'One + One' );
  echo( '"In double quotation Marks"' );
  echo( 'Price tags: € 10.00, € 10.00, € 10.00');
  echo( '3 * 2 = 6' );
  echo( 'A cheap way to continue on
the next line' ); // Not recommended. Use '...', new line, '...' instead.
  echo( new line, 'Line 1', new line, 'Line 2' );
Hello World
  Hello   World  
One + One
"In double quotation Marks"
Price tags: € 10.00, € 10.00, € 10.00
3 * 2 = 6
A cheap way to continue on
the next line

Line 1
Line 2
Try it yourself: Open LAN_Features_Text_inside_single_quotation_marks.b4p in B4P_Examples.zip. Decompress before use.

See also

Plain text
Text inside double quotation marks
Multi-line text
softquoted strings