-> Operator has very low precedence, size_of, align_of, length_of expressions

This commit is contained in:
Krzosa Karol
2022-06-14 13:50:59 +02:00
parent 17e342c4da
commit f885abe3f5
7 changed files with 121 additions and 58 deletions

14
main.kl
View File

@@ -1,16 +1,10 @@
#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)
print :: (string: String)
handle := Windows.GetStdHandle(Windows.STD_OUTPUT_HANDLE)
Windows.WriteConsoleA(handle, &string[0]->*void, length_of(string)->Windows.DWORD, 0, 0)
main :: (argc: int, argv: **char): int
memory := reserve(size = 10000)
handle := Windows.GetStdHandle(Windows.STD_OUTPUT_HANDLE)
print("Hello world")
string: *char = "hello world"
Windows.WriteConsoleA(handle, string->*void, 11, 0, 0)