Compiling and running first program!
This commit is contained in:
22
lambdas.kl
22
lambdas.kl
@@ -1,8 +1,8 @@
|
||||
a_type :: Int
|
||||
poInter_type :: *Int
|
||||
// null_poInter: poInter_type = null
|
||||
a_type :: int
|
||||
pointer_type :: *int
|
||||
// null_pointer: pointer_type = null
|
||||
|
||||
if_stmt :: (cond: Int): type
|
||||
if_stmt :: (cond: int): type
|
||||
CONSTANT :: 10
|
||||
thing := 10
|
||||
if i := thing + cond, cond + CONSTANT
|
||||
@@ -17,11 +17,11 @@ for_stmt :: ()
|
||||
for i := 0, i + 10, i+=1
|
||||
pass
|
||||
|
||||
add_10 :: (size: Int): Int
|
||||
add_20 :: (new_size: Int): Int
|
||||
add_10 :: (size: int): int
|
||||
add_20 :: (new_size: int): int
|
||||
return 20
|
||||
|
||||
add :: (a: Int, b: Int = 10): Int
|
||||
add :: (a: int, b: int = 10): int
|
||||
return a + b
|
||||
|
||||
constant :: 20; result := constant + 10
|
||||
@@ -38,13 +38,13 @@ add_10 :: (size: Int): Int
|
||||
|
||||
return v4
|
||||
|
||||
return_constant :: (): Int
|
||||
return_constant :: (): int
|
||||
constant :: 10
|
||||
return constant
|
||||
|
||||
returning_Void :: (insert: Int)
|
||||
val1: Int = return_constant()
|
||||
val2: Int = add_10(val1)
|
||||
returning_void :: (insert: int)
|
||||
val1: int = return_constant()
|
||||
val2: int = add_10(val1)
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user