2021-05-11 16:09:09 +00:00
|
|
|
%import textio ; txt.*
|
|
|
|
main {
|
|
|
|
sub start() {
|
|
|
|
; ATTENTION: uncomment only one problematic line at a time!
|
2021-04-18 11:53:02 +00:00
|
|
|
|
2021-05-11 16:09:09 +00:00
|
|
|
; Normal string literals, i.e. PETSCII encoding
|
|
|
|
; ---------------------------------------------
|
|
|
|
txt.print("\"") ; fine
|
|
|
|
txt.print("\n") ; fine
|
|
|
|
txt.print("\r") ; fine
|
|
|
|
; txt.print("\\") ; yields CharConversionException
|
|
|
|
; txt.print("xyz\\") ; yields prog8.compiler.AssemblyError
|
2021-05-06 22:04:29 +00:00
|
|
|
|
2021-05-11 16:09:09 +00:00
|
|
|
; @-strings, i.e. translated into
|
|
|
|
; the alternate character encoding (Screencodes/pokes)
|
|
|
|
; ----------------------------------------------------
|
|
|
|
txt.print(@"\"") ; fine
|
|
|
|
txt.print(@"\n") ; yields CharConversionException
|
|
|
|
; txt.print(@"xyz\n") ; yields prog8.compiler.AssemblyError
|
|
|
|
; txt.print(@"\r") ; yields CharConversionException
|
|
|
|
; txt.print(@"xyz\r") ; yields prog8.compiler.AssemblyError
|
|
|
|
; txt.print(@"\\") ; yields CharConversionException
|
|
|
|
; txt.print(@"\\") ; yields prog8.compiler.AssemblyError
|
2021-05-06 22:04:29 +00:00
|
|
|
|
2021-05-11 16:09:09 +00:00
|
|
|
; there may be more...
|
|
|
|
}
|
|
|
|
}
|