Skip to content
Newer
Older
100644 24 lines (18 sloc) 576 Bytes
0f325fc second commit
nddrylliog authored
1 import structs/ArrayList
2
3 /**
4 * Literals, type inferred, implicit degradation to raw C arrays.
5 */
6 main: func {
7
8 print(["Jo" + "hn", "Doe"])
9 printRaw(["Jo" + "hn", "Doe"])
10 printArrayList(["Jo" + "hn", "Doe"])
11
12 }
13
14 print: func (array: String[]) {
15 "First name: %s, Last name: %s" format(array[0], array[1]) println()
16 }
17
18 printRaw: func (array: String*) {
19 "First name: %s, Last name: %s" format(array[0], array[1]) println()
20 }
21
22 printArrayList: func (array: ArrayList<String>) {
23 "First name: %s, Last name: %s" format(array[0], array[1]) println()
24 }
Something went wrong with that request. Please try again.