12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- println("Hello world!");
- println(1 as string);
-
-
- var test = "test";
- println(test);
-
-
- test = "testMore";
- println(test);
-
- test = 13;
- println(test);
-
- val test2 = 14;
- println(test2);
-
-
- if true
- println("ifTest");
- else
- println("elseTest");
-
-
- if false
- println("testIf");
- else
- println("testElse");
-
-
- if (true) {
-
- while :testLable true {
- println("trueee");
- if true
- break testLable;
- else
- println("nobreak");
- }
-
-
- do {
- println("tru");
- if(false){
- println("brea");
- continue;
- }
- else{
- println("");
- break;
- }
- } while true;
- }
-
- var testArray = ["1", "2", "3"];
-
- for item in testArray {
- println("test");
- println(item);
- }
-
- println("");
-
- var test2 = [1, 2, 3];
-
- for item in test2 {
- println(item);
- }
-
- for i, item in ["5", "ttt"] {
- println(item + i);
- }
-
- for i, item in [1, 5, 7] {
- println(item + i);
- }
-
- for myI in 10 .. 20 {
- println(myI);
- }
-
- var lateInit as string;
- lateInit = "initialized later";
- println(lateInit);
-
-
-
-
-
- /*
- catch e as string {
- println("noLuv");
- }
- */
|