Adding len() builtin and TYPE_SLICE
This commit is contained in:
8
main.kl
8
main.kl
@@ -1,8 +1,16 @@
|
||||
#import "base.kl"
|
||||
|
||||
test_arrays :: ()
|
||||
array := [4]int{1,2,3,4}
|
||||
item := array[0]
|
||||
length := len(array)
|
||||
slice: []int = array
|
||||
slice_length := len(slice)
|
||||
|
||||
main :: (argc: int, argv: **char): int
|
||||
memory := reserve(size = 10000)
|
||||
handle := Windows.GetStdHandle(Windows.STD_OUTPUT_HANDLE)
|
||||
|
||||
|
||||
string: *char = "hello world"
|
||||
Windows.WriteConsoleA(handle, string->*void, 11, 0, 0)
|
||||
|
||||
Reference in New Issue
Block a user