literals
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
literals [2018/02/10 14:51] – wolfgangriedmann | literals [2018/02/14 05:10] – [String literals] wolfgangriedmann | ||
---|---|---|---|
Line 12: | Line 12: | ||
< | < | ||
Console.WriteLine( i"Hi {cValue}" | Console.WriteLine( i"Hi {cValue}" | ||
+ | |||
+ | 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 '' | ||
+ | < | ||
For more details please see [[strings|Strings and their prefixes]] and [[string_char_byte|String, | For more details please see [[strings|Strings and their prefixes]] and [[string_char_byte|String, | ||
Line 20: | Line 23: | ||
If you need to specify what type a numeric literal should take, use suffixes: | If you need to specify what type a numeric literal should take, use suffixes: | ||
* '' | * '' | ||
- | * '' | + | * '' |
* '' | * '' | ||
* '' | * '' | ||
You can also use a prefix of '' | You can also use a prefix of '' | ||
Sample code: | Sample code: | ||
- | < | + | < |
- | Console.WriteLine( " | + | Console.WriteLine( " |
- | Console.WriteLine( " | + | Console.WriteLine( " |
- | Console.WriteLine( " | + | Console.WriteLine( " |
- | Console.WriteLine( " | + | Console.WriteLine( " |
- | Console.WriteLine( " | + | Console.WriteLine( " |
- | Console.WriteLine( " | + | Console.WriteLine( " |
- | Console.WriteLine( " | + | Console.WriteLine( " |
For explanations why these suffixes differ from these on C#, please see this X# forum post: [[https:// | For explanations why these suffixes differ from these on C#, please see this X# forum post: [[https:// | ||
literals.txt · Last modified: 2018/08/20 04:05 by wolfgangriedmann