Re: Suggestion: declaring multiple interleaved constant sequences
- Posted by petelomax Jun 03, 2014
- 1555 views
ArthurCrump said...
Of course, it would be helpful if the multiple assignments in v4.1 could be extended to constants:
constant {fields,descs} = columnize(...etc...)
I just put that into Phix (next release not expected until sometime around autumn 2038 ).
It was ridiculously easy, really, all it needed was an extra parameter on MultipleAssignment() to prohibit subscripts and add the new symtab entries, which might give someone on the OE team an idea.
You (well, I) can also do things like
constant {opcode,{scale,index,base,offset}} = somefunc(mnemonic,var_id)
Admittedly that particular example makes more sense when declaring local variables with this syntax.
integer {opcode,{scale,index,base,offset}} = somefunc(mnemonic,var_id)
Pete