On 1/16/06, Leopold Toetsch <[EMAIL PROTECTED]> wrote: > Roger Browne wrote: > > > Wow, it really does work. Thanks! Although it misses the case where the > > called sub has zero .params: > > > > .sub 'main' :main > > errorson 0x0C > > foo(5) > > .end > > .sub foo > > print "Not OK\n" > > .end > > As said, get_params isn't emitted at all, if there are no params. A > simple work-around could be: > > .macro .no_params # maybe defined internally > get_params '()' > .endm > ... > > .sub foo > .no_params # could of course just emit the get_params directly > ... > > With r11213 this throws an exception for the above sample code. > > Should we just use this syntax? > i suppose we need a design decision on this. in the meantime, i've added t/op/cc_params.t which tests required positional parameter mismatches. it's a test generator, so the .t file isn't too enlightening, but the test files it generates should give good ideas for usage.
hope that helps. ~jerry