-> Operator has very low precedence, size_of, align_of, length_of expressions
This commit is contained in:
14
main.kl
14
main.kl
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user