08-11-2023, 10:41 PM
in fact this function can be easy to translate into any BASIC
Code: (Select All)
set-Up-Arguments
function setupArgs(int nArgs) {
getLeftParen(); ' get "("
int i = topOfStack;
int count = nArgs;
If (nextToken() <> ")" )
do {
getToken();
If (i>=0)
stack.symTabIndex = tokenAddress;
i = i - 1 ' count from top to botom
count = count - 1
getToken();
} While (token = ",");
putTokenBack();
}
If (count!=0)
error(nArgs+" argument"+(nArgs==1?"":"s")+" expected");
getRightParen(); '-> get ")"
}
micro(A)developer
http://basic4us.epizy.com/forum/index.php
http://basic4us.epizy.com/forum/index.php