Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add a test for passing num args.
  • Loading branch information
kjs committed Jun 13, 2012
1 parent ea61e3d commit 63f996d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions t/numparam.m1
@@ -0,0 +1,22 @@
int main() {
print("1..2\n");
foo(1.5);

}

int foo(num n) {
int i = (int)n;
print("ok ");
print(i);
print("\n");

n = 2.3;
bar(n);
}

int bar(num m) {
int j = (int)m;
print("ok ");
print(j);
print("\n");
}

0 comments on commit 63f996d

Please sign in to comment.