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

@ -0,0 +1,4 @@
<cfoutput>
<cfset who = "World!">
#"Hello " & who#
</cfoutput>

View file

@ -0,0 +1,5 @@
<cfscript>
who = "World!";
greeting = "Hello " & who;
writeOutput( greeting );
</cfscript>

View file

@ -1,13 +1,14 @@
#import system.
import extensions.
#symbol program =
program =
[
#var s := "World".
var s := "World".
s := "Hello " + s.
console writeLine:s.
// Alternative way
#var s2 := String new:"World".
s2 insert:"Hello " &at:0.
var s2 := String new:"World".
s2 insert:"Hello " at:0.
console writeLine:s2.
console readChar.
].

View file

@ -0,0 +1,9 @@
Public Sub Main()
Dim sString1 As String = "world!"
Dim sString2 As String = "Hello "
sString1 = sString2 & sString1
Print sString1
End

View file

@ -0,0 +1,4 @@
// No built-in prepend
var s=", World"
s = "Hello" + s
print(s);

View file

@ -0,0 +1,13 @@
// version 1.0.6
fun main(args: Array<String>) {
var s = "Obama"
s = "Barack " + s
println(s)
// It's also possible to use this standard library function
// though this is not what it's really intended for
var t = "Trump"
t = t.prependIndent("Donald ")
println(t)
}

View file

@ -0,0 +1,6 @@
class Prepend {
function : Main(args : String[]) ~ Nil {
s := "world!";
"Hello {$s}"->PrintLine();
}
}

View file

@ -0,0 +1,5 @@
s:="bar"; s="foo" + s; s.println();
s:="bar"; s=String("foo",s); s.println();
s:="bar"; s="%s%s".fmt("foo",s); s.println();
// a Data is a byte buffer/editor:
s:=Data(Void,"bar").insert(0,"foo").text; s.println();