Right now macros in porth.porth refer to addresses of corresponding objects And they de referenced as needed ## Proposal: Template for names of addresses: ``` &{name} ``` So, macros that gets value of single cell object can be implemented like this: ``` macro {name} &{name} @64 end ``` And for writing single cell values, like this (not sure about syntax): ``` macro ={name} &{name} !64 end ``` With #129 this code ``` macro push-op // type operand -- ops-count @64 sizeof(Op) * ops + dup Op.operand rot swap !64 Op.type !64 ops-count inc64 end ``` transforms into this ``` macro push-op // type operand -- ops-count &ops[] dup Op.operand rot swap !64 Op.type !64 &ops-count inc64 end ``` A lot more readable
Right now macros in porth.porth refer to addresses of corresponding objects
And they de referenced as needed
Proposal:
Template for names of addresses:
So, macros that gets value of single cell object can be implemented like this:
And for writing single cell values, like this (not sure about syntax):
With #129 this code
transforms into this
A lot more readable