: local "a";
: local "b" ;
: set_integer var = "a" value = "1" ;
: set_integer var = "b" value = "5" ;
: gosub "add";
: print (result_int);
subroutines {
add : subroutine {
: set_integer var = "result_int" value -> (a+b) ;
}
}
Proposal:
: gosub "add" a="1" b="5";
: print (result_int);
subroutines {
add : subroutine {
: arg_integer var = "a";
: arg_integer var = "b";
: set_integer var = "result_int" value -> (a+b) ;
}
}
Since subroutines are known at compile time the arguments to gosub also should be easy enough to evaluate at compile time... though this might require a quick second pass (not sure how the compiler works now)...
Presently (best way I know how):
Proposal:
Since subroutines are known at compile time the arguments to
gosub
also should be easy enough to evaluate at compile time... though this might require a quick second pass (not sure how the compiler works now)...