Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
string_type [2013/09/05 19:56]
127.0.0.1 external edit
string_type [2020/05/05 15:54]
francisco [EGO Script]
Line 8: Line 8:
  
 ===== EGO Script ===== ===== EGO Script =====
 +
 +==== Legacy ====
  
 Strings are sequences of any characters enclosed by double quotes '"'​. Strings are sequences of any characters enclosed by double quotes '"'​.
Line 15: Line 17:
 <code cpp>"​North"</​code>​ <code cpp>"​North"</​code>​
  
-<code cpp>"​This is example of string"</​code>​+<code cpp>"​This is an example of string"</​code>​
  
 <code cpp>"​landscape_123 ​      "</​code>​ <code cpp>"​landscape_123 ​      "</​code>​
  
 <code cpp>"​x1_and_a_name"</​code>​ <code cpp>"​x1_and_a_name"</​code>​
 +
 +<code cpp>"​string with \"​double quotes\""</​code>​
  
 A string can be any size long and it can also span across several lines. A string can be any size long and it can also span across several lines.
Line 27: Line 31:
 with multiple lines. with multiple lines.
 Note that line breaks do not need to marked using any special syntax."​ Note that line breaks do not need to marked using any special syntax."​
 +</​code>​
 +
 +==== Raw String Format (starting on Dinamica 5.0.1) ====
 +
 +The raw string is written with the following syntax:
 +
 +$"<​delimiter>​( raw_characters )<​delimiter>"​
 +
 +Where raw_characters is your string, sequences of any characters, and <​delimiter>​ is any character that, with the character '​)',​ is not present into raw_characters (it can be none, case where the character '​)'​ is not present into raw_characters).
 +
 +<code cpp>​$"​(This is an example of String)"</​code>​
 +
 +<code cpp>​$"​0(This is an example of String with the character ))0"</​code> ​
 +
 +<code cpp>​$"​1(This is an example of String with the character )0)1"</​code> ​
 +
 +A string can be any size long and it can also span across several lines.
 +
 +<code cpp>
 +$"​(This is an example of a very long string
 +with multiple lines.
 +Note that line breaks do not need to marked using any special syntax.)"​
 </​code>​ </​code>​
 ===== Automatic Conversions ===== ===== Automatic Conversions =====
  
-  * **Converted from**: [[Double ​Type]], [[Int Type]], [[Non Negative ​Int Type]], [[Positive ​Int Type]], [[Log Tag Type]], [[Name Type]], [[Bool Type]], [[Map Filename Type]], [[Lookup Table Filename Type]], [[Table Filename Type]], [[Weights Filename Type]] and [[Table Value Type]].+  * **Converted from**: [[Real Value Type]], [[Integer Value Type]], [[Non Negative ​Integer Value Type]], [[Positive ​Integer Value Type]], [[Log Tag Type]], [[Name Type]], [[Boolean Value Type]], [[Map Filename Type]], [[Lookup Table Filename Type]], [[Table Filename Type]], [[Weights Filename Type]] and [[Table Value Type]].
  
-  * **Converted to**: [[Name Type]], [[Double ​Type]], [[Index Or Name Type]], [[Map Filename Type]], [[Lookup Table Filename Type]], [[Table Filename Type]], [[Weights Filename Type]], [[Tuple Type]] and [[Table Value Type]].+  * **Converted to**: [[Name Type]], [[Real Value Type]], [[Index Or Name Type]], [[Map Filename Type]], [[Lookup Table Filename Type]], [[Table Filename Type]], [[Weights Filename Type]], [[Tuple Type]] and [[Table Value Type]].