|
List Info
Thread: Operators and their arguments
|
|
| Operators and their arguments |

|
2006-05-22 14:30:11 |
|
me. I notice, however, that Marko Mikulicic has a posting on the
topic here:
<http://groups.yahoo.com/group/iolanguage/message/7141>
A short description of the problem is this:
Io to some degree allows us to write arithmetic expressions with
operator precedence as in C or FORTRAN, but when an operator is
followed by a parenthesis, the operator "forgets about" precedence
rules and acts as a normal Io method.
This can of course be confusing for a newbie, and as far as I know
there isn't much to be found on this behavior in the Io docs. My
example is this:
1 + 5 * 4
==> 21 // expected
1 + (2 + 3) * 4
==> 24 // you see?
Some of you may say it's the way Io should be (and forget about
FORTRAN), others may say it's a bug that should be fixed. My main
concern is that the "Io authorities" should make a decision here, and
put it in the docs. There are persons working on Io parser
improvements right now, and you can't write a good parser if the
specs are unclear!
/Jon
|
[1]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|