September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -1,4 +1,4 @@
#var c := #65. // character
#var s := "some text". // UTF-8 literal
#var w := "some wide text". // UTF-16 literal
#var s2 := "text with ""quotes"" and "#13#10"two lines".
var c := $65. // character
var s := "some text". // UTF-8 literal
var w := "some wide text"w. // UTF-16 literal
var s2 := "text with ""quotes"" and "$13$10"two lines".

View file

@ -1,5 +1,2 @@
TEXT = 'That''s right!' !Only apostrophes as delimiters. Doubling required.
TEXT = "That's right!" !Chose quotes, so that apostrophes may be used freely.
TEXT = "He said ""That's right!""" !Give in, and use quotes for a "quoted string" source style.
TEXT = 'He said "That''s right!"' !Though one may dabble in inconsistency.
TEXT = 23HHe said "That's right!" !Some later compilers allowed Hollerith to escape from FORMAT.
BLAH = "
1Stuff"

View file

@ -1 +1,5 @@
TEXT = "That's"//CHAR(10)//"right!" !For an ASCII linefeed (or newline) character.
TEXT = 'That''s right!' !Only apostrophes as delimiters. Doubling required.
TEXT = "That's right!" !Chose quotes, so that apostrophes may be used freely.
TEXT = "He said ""That's right!""" !Give in, and use quotes for a "quoted string" source style.
TEXT = 'He said "That''s right!"' !Though one may dabble in inconsistency.
TEXT = 23HHe said "That's right!" !Some later compilers allowed Hollerith to escape from FORMAT.

View file

@ -0,0 +1 @@
TEXT = "That's"//CHAR(10)//"right!" !For an ASCII linefeed (or newline) character.

View file

@ -0,0 +1,10 @@
echo Quotes are optional in most cases.
echo
echo 'But they are when using either of these characters (or whitespace):'
echo '# $ % ^ & * ( ) { } ; \' " \\ < > ?'
echo
echo Single quotes only interpolate \\ and \' sequences.
echo '\In \other \cases, \backslashes \are \preserved \literally.'
echo
set something variable
echo "Double quotes interpolates \\, \" and \$ sequences and $something accesses."

View file

@ -0,0 +1 @@
'a outascii

View file

@ -0,0 +1 @@
'yo...dawg. print

View file

@ -0,0 +1,26 @@
// version 1.0.6
fun main(args: Array<String>) {
val cl = 'a' // character literal - can contain escaped character
val esl = "abc\ndef" // escaped string literal - can contain escaped character(s)
val rsl = """
This is a raw string literal
which does not treat escaped characters
(\t, \b, \n, \r, \', \", \\, \$ and \u)
specially and can contain new lines.
"Quotes" or doubled ""quotes"" can
be included without problem but not
tripled quotes.
"""
val msl = """
|Leading whitespace can be removed from a raw
|string literal by including
|a margin prefix ('|' is the default)
|in combination with the trimMargin function.
""".trimMargin()
println(cl)
println(esl)
println(rsl)
println(msl)
}

View file

@ -0,0 +1,3 @@
text:=
0'|foo|
"bar\n";

View file

@ -0,0 +1,4 @@
n:=7; text:=String(
"foo = ",3,"\n"
"bar=",n,"\n"
);