User Tools

Site Tools


literals

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
literals [2018/02/12 07:07] wolfgangriedmannliterals [2018/02/14 05:10] – [String literals] wolfgangriedmann
Line 12: Line 12:
 <code>local cValue := "guys" as string <code>local cValue := "guys" as string
 Console.WriteLine( i"Hi {cValue}" ) // Hi guys</code> Console.WriteLine( i"Hi {cValue}" ) // Hi guys</code>
 +
 +Since in the VO dialect a string can also be defined with single quotation marks, there is no possibility for the compiler to see a difference between a single character string and a char. Therefore you should prefix a char literal with a ''c'' like this:
 +<code>cChar := c'\r'</code>
  
 For more details please see [[strings|Strings and their prefixes]] and [[string_char_byte|String, Char and Byte]] For more details please see [[strings|Strings and their prefixes]] and [[string_char_byte|String, Char and Byte]]
literals.txt · Last modified: 2018/08/20 04:05 by wolfgangriedmann