Luke said: > Plus, parameters to functions are likely to be used > in the code of the > function (and likewise with return values), so we're > just skipping > unloading the array into registers.
OK. That makes sense, but my problem is: in the case that the called function *does* treat its parameter list as an array, it's going to have to have some ugly code: (pretend this is some kinda pseudo-imcc) sub print if numparams >= 1 print P5 end if numparams >= 2 print P6 end if numparams >= 3 print P7 end ...whole bunch of checks and prints... if numparams >= 16 for p in P4 print p end end end maybe this kind of unprototyped function is expected to be uncommon enough that we can put up with having to emit code like the above... But unless people are really sure this is the way to go, it seems to me that we ought to be able to do better :-S Perhaps there could be a set of opcodes that allow called functions to treat the parameter list as a single array? That might be the best of both worlds. Kind of like the save_top op saving your code from 16 save operations. Except more important :-P sub print load_params P0 # all your parameters are now in $P0 for p in P0 print p end end Anyway, yeah. My ConfigScript interpreter would like that. ;-) __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com