Text Inside Double Quotation Marks

Prev Next

Introduction

Text inside quotation marks allows practically all characters except the same double quotation mark symbol inside the text. If this is needed, you put the text inside double quotation marks instead.

Text inside double quotation marks can be used for

Rules

  • Use double quotation marks " ... " to enclose the text.
  • Inside the quotation marks, all characters are fine, except the double 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 """ 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 false.
  • Character entities are not supported in texts inside double quotation marks. Any such specification is part of the quoted text.
  • If the text is assigned to B4P variables or used inside expressions, then the variable assumes the type string and subtype quoted string.

Examples
       echo( "Hello World" );
       echo( "  Hello   World  " );
       echo( "One + One" );
       echo( "'single quotation Marks'" );
       echo( "Price tags: € 10.00, € 10.00, € 10.00"); // No translation of entities here
       echo( "3 * 2 = 6" );
       echo( "A cheap way to continue on
the next line" ); // No translation of entitites here
       echo( new line, "Line 1", new line, "Line 2" );
Hello World
  Hello   World  
One + One
'single 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_double_quotation_marks.b4p in B4P_Examples.zip. Decompress before use.

See also

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