Add import (only for functions for now) and call

This commit is contained in:
Nathan Braswell
2021-07-25 18:10:10 -04:00
parent 3ad51ce19d
commit 6cacd32c00
4 changed files with 61 additions and 17 deletions

View File

@@ -1064,7 +1064,7 @@ fun main(argc: int, argv: **char): int {
if params.size <= 1 {
return make_pair(null<KPEnv>(), KPResult::Err(kpString(str("Need 2 or more params to <"))))
}
if !params[0].is_int() { return make_pair(null<KPEnv>(), KPResult::Err(kpString(str("called < with first not an int")))); }
if !params[0].is_int() { return make_pair(null<KPEnv>(), KPResult::Err(kpString(str("called < with first not an int ") + pr_str(params[0], true)))); }
for (var i = 0; i < params.size - 1; i++;) {
if !params[i+1].is_int() { return make_pair(null<KPEnv>(), KPResult::Err(kpString(str("called < with param ") + (i+1) + " not an int " + pr_str(params[i+1], true)))); }
if !(params[i].get_int() < params[i+1].get_int()) {