Maybe this could be temporarily turned on/off?calima wrote: ↑Sun Apr 30, 2023 9:44 amThat's unlikely to happen since math order and range are usually taken into account.psycopathicteen wrote: ↑Sun Apr 30, 2023 8:49 am If somebody is making a C-like compiler, I would like to see something like this:
a = b + c - d | e & f
get assembled as:
lda b
clc
adc c
sec
sbc d
ora e
and f
sta a
Just going left to right and treating the accumulator as whatever the answer to the last arithmetic/logical operator.
In Free Pascal a feature like that would look similar to this:
Code: Select all
{$push} {$OperatorPrecedence off}
a := b + c - d OR e AND f;
{$pop}