Created
October 28, 2021 22:14
-
-
Save abcarroll/f2544376d7fbab2c3e0eb443ad8b28da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn testFnDecl() | |
{ | |
let $x = 0; | |
let $y: int = 10; | |
let $z: string = "Hello World"; | |
} | |
pub static fn testFnMore($a: int, $b: int): int | |
{ | |
let $x = 5; | |
} | |
fn testFnAgain($a: int): string | |
{ | |
let $z = 6; | |
} | |
fn complexTypeTest($a: map<string>, $b: string) | |
{ | |
let $z = $a[ $b ]; | |
return $z; | |
} | |
fn testIfCondAndComplexVarRef($x: int, $y: int) | |
{ | |
let $r: int; | |
if $x > $y { | |
$r = $x; | |
} | |
return $r; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment