POV-Ray : Newsgroups : povray.beta-test : the umpteenth time: removed features :( : Re: Doc: hat still in 6.5.4.2 (possibly elsewhere) Server Time
29 Jul 2024 14:14:23 EDT (-0400)
  Re: Doc: hat still in 6.5.4.2 (possibly elsewhere)  
From: Christopher James Huff
Date: 25 Jun 2002 10:33:58
Message: <pan.2002.06.25.09.33.38.700649.635@mac.com>
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] maccom>
POV-Ray TAG e-mail: <chr### [at] tagpovrayorg>
WWW: http://homepage.mac.com/chrishuff/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.