Remove int uint, all programs compiling
This commit is contained in:
30
globals.kl
30
globals.kl
@@ -1,44 +1,44 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Function types
|
||||
//-----------------------------------------------------------------------------
|
||||
test_function :: (thing: int): *int
|
||||
test_function :: (thing: S64): *S64
|
||||
function_type: test_function
|
||||
const_function_alias :: test_function
|
||||
// null_function: (t: int): *int = null
|
||||
// null_function: (t: S64): *S64 = null
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Booleans
|
||||
//-----------------------------------------------------------------------------
|
||||
Boolean: Bool = true
|
||||
value_of_Bool: int = cast(Boolean: int)
|
||||
value_of_Bool: S64 = cast(Boolean: S64)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Nulls
|
||||
//-----------------------------------------------------------------------------
|
||||
// int_null: int = null
|
||||
// int_null: S64 = null
|
||||
// str_null: String = null
|
||||
// Bool_null: Bool = null
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Compound expressions
|
||||
//-----------------------------------------------------------------------------
|
||||
array1: [4]int = [4]int(1,2,3,4)
|
||||
array2 := [32]int(1,2,3,4)
|
||||
array3 := [32]int(
|
||||
array1: [4]S64 = [4]S64(1,2,3,4)
|
||||
array2 := [32]S64(1,2,3,4)
|
||||
array3 := [32]S64(
|
||||
[0] = 0,
|
||||
[1] = 1,
|
||||
[2] = 2,
|
||||
[31] = 31,
|
||||
)
|
||||
array_item := array1[0]
|
||||
array_item_imp: int = array2[2]
|
||||
array_item_imp: S64 = array2[2]
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Pointers
|
||||
//-----------------------------------------------------------------------------
|
||||
pointer_decl : *int
|
||||
variable_from_deref: int = *pointer_decl
|
||||
pointer_from_var : *int = &variable_from_deref
|
||||
pointer_decl : *S64
|
||||
variable_from_deref: S64 = *pointer_decl
|
||||
pointer_from_var : *S64 = &variable_from_deref
|
||||
Boolean_pointer := &Boolean
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -50,9 +50,9 @@ implicit_str :: "Hello world"
|
||||
//-----------------------------------------------------------------------------
|
||||
// Pointers
|
||||
//-----------------------------------------------------------------------------
|
||||
// pointer1: *int = 0
|
||||
// pointer2: *int = pointer1
|
||||
// pointer3: **int = 0
|
||||
// pointer1: *S64 = 0
|
||||
// pointer2: *S64 = pointer1
|
||||
// pointer3: **S64 = 0
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// String types
|
||||
@@ -61,7 +61,7 @@ string1 :: "Test"
|
||||
string2 :: string1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Constant int variables
|
||||
// Constant S64 variables
|
||||
//-----------------------------------------------------------------------------
|
||||
thing0 :: 10
|
||||
thing1 :: thing0 + 11
|
||||
|
||||
Reference in New Issue
Block a user