Flexible Operators working within types
Posted: Mon Apr 29, 2019 4:48 am
This is a simplified version of it but, mostly a wildly interesting thing that could be added.
Giving us more control over the operators. I am sure it could be much more advanced than what i am showing.
Giving us more control over the operators. I am sure it could be much more advanced than what i am showing.
Code: Select all
Structure Numbers
one.i
two.i
If Operator '+'
new(one.i) = old(one.i) + current(one.i)
new(two.i) = old(two.i) + current(two.i)
EndIf
EndStructure
test1.Numbers
test1\one = 5
test1\two = 7
test2.Numbers = test1
test3.Numbers = test1 + test2
test4.Numbers = test1 + test2 + test3
; Results for test3 and test4
;------------------
; test3\one = 10
; test3\two = 14
;-------------------
; test4\one = 20
; test4\two = 24
;------------------