POV-Ray : Newsgroups : povray.off-topic : Theoretical programming question : Re: Theoretical programming question Server Time
11 Oct 2024 07:11:14 EDT (-0400)
  Re: Theoretical programming question  
From: Warp
Date: 30 Oct 2007 21:49:52
Message: <4727ed50@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Warp wrote:
> >   What is *not* supported is accessing any value in the stack deeper
> > than the two top values (which can be accessed eg. using the swap
> > command).

> How about reading and writing memory that isn't an "immediate" value? 
> (I.e., random data memory, instead of inline literals in the code?)

  Well, that would effectively be a variable, and thus it's not so much
a stack-based language anymore.

  In this specific case, there's no such support. (Well, technically
speaking it could be possible to construct support for it, but it's way
too cumbersome and complicated to be feasible.)

> I *will* say that when I implemented FORTH a few times, getting things 
> like "access 6 deep and copy it to the top of the stack" made things 
> about 23,845 times easier to write programs.

  I know, but no such luck in this case...

-- 
                                                          - Warp


Post a reply to this message

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