diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-09-23 17:53:39 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-09-23 17:53:39 +0200 |
commit | ecbc58fb917c292f05bed401afe7be0a80971d80 (patch) | |
tree | cbd6b0e2bb8d5f2638acae023b50134f516371e9 /doc/generate-docs.tes | |
parent | c3f7aa7252ad9adb51cef1e35f566883ef953aad (diff) | |
download | sciteco-ecbc58fb917c292f05bed401afe7be0a80971d80.tar.gz |
different operators can have the same precedence now
* SciTECO now has the same operator precedence table as C.
* It is numerically important whether different operators
have the same precedence. E.g. "5*2/4" used to be evaluated
by SciTECO as "5*(2/4)" since division had a higher precedence
than multiplication. Within in real (!) numbers this would
be the expected evaluation order.
Users of other programming languages however would expect
the expression to be evaluated as "(5*2)/4" which makes
a numerical difference when working with integers.
* Operator precedence has been implemented by encoding it
into the enumeration values used to represent different
operators.
Calculating the precedence of a given operator can then
be done very efficiently and elegantly (in our case using
a plain right shift operation).
* documentation updated. We use a precedence table now.
Diffstat (limited to 'doc/generate-docs.tes')
0 files changed, 0 insertions, 0 deletions