|
![](/i/fill.gif) |
On Tue, 25 Jun 2002 02:18:15 -0500, Mark Wagner wrote:
> This is what I like about postfix notation: 2 2 * 2 / 2 * is
> unambiguously 4.
Have fun convincing anyone to use that... ;-)
Really, it seems like a tree would be a better representation than any
linear string:
4
=
*
/ 2
* 2
2 2
However, that makes it a bit difficult to write and takes up a lot of
room, and doesn't really work well anyway with plain text, maybe we can
use some kind of notation to let it all fit on a line and be easy to
type...I know, lets use () marks to enclose each branch: (((2*2)/2)*2)
Typing all those () is a pain though, maybe make some simple rules for
which operations to do first, people can still use () to force a different
order or clarify the meaning when needed. ;-)
--
Christopher James Huff <chr### [at] mac com>
POV-Ray TAG e-mail: <chr### [at] tag povray org>
WWW: http://homepage.mac.com/chrishuff/
Post a reply to this message
|
![](/i/fill.gif) |