Groups | Search | Server Info | Login | Register


Groups > comp.lang.postscript > #4014

Re: Stack Management In GXScript

From Buzz McCool <buzz_mccool@yahoo.com>
Newsgroups comp.lang.postscript
Subject Re: Stack Management In GXScript
Date 2025-01-03 08:53 -0800
Organization A noiseless patient Spider
Message-ID <vl94mo$3vb8n$1@dont-email.me> (permalink)
References <vkt8p3$1fes1$1@dont-email.me>

Show all headers | View raw


On 12/29/2024 8:49 PM, Lawrence D'Oliveiro wrote:
> Programming in stack-based languages is notoriously error-prone: it is way
> too easy to lose track of where an operand on the stack came from, and
> leave too many or too few operands for an operation.
gforth allows the use of "locals" in cases like this:
https://gforth.org/manual/Local-Variables-Tutorial.html

Of course many on comp.lang.forth believe if you are having trouble 
keeping track of your stack operands, you should break up your function 
(aka Forth word) into multiple smaller words. So some say that losing 
track of stack operands is a Forth language feature that tells you that 
you are not writing your Forth program correctly.

BTW, I really applaud the work you are doing. I would use PostScript 
more than I already do if it had double precision floating point math 
capabilities. I've always toyed with the idea of including the math 
needed to compute an engineering equation and a graph/figure to 
illustrate it in a single unified program. I haven't pursed it on 
PostScript because of the precision issue.

Back to comp.lang.postscript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Stack Management In GXScript Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-30 04:49 +0000
  Re: Stack Management In GXScript Buzz McCool <buzz_mccool@yahoo.com> - 2025-01-03 08:53 -0800
    Re: Stack Management In GXScript Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-03 21:23 +0000
      Re: Stack Management In GXScript Buzz McCool <buzz_mccool@yahoo.com> - 2025-01-06 08:03 -0800
        Re: Stack Management In GXScript Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-06 20:15 +0000

csiph-web