50g group photo

Yahoo Groups archive

50g

Archive for 50g.

Index last updated: 2026-03-30 00:59 UTC

Thread

What is the stack size?

What is the stack size?

2009-06-20 by rickwendel763242

How many numbers can you type in and hit Enter and then retrieve from the stack?

Re: [50g] What is the stack size?

2009-06-20 by Dave Boyd

rickwendel763242 wrote:
> How many numbers can you type in and hit Enter and then retrieve from
> the stack?

Limited only by size of memory, how full memory is (how many programs
and variables you've stored), and of course the size of the objects on
the stack -- obviously a list of ten reals takes a bit more than ten
times the memory space as one real, but only consumes one "stack entry".

Enough so you'd be bored before you ran out of memory. Enough so the
exact answer need never be calculated. Enough.

I once ran a program to put ten thousand reals on the stack. It slowed
down and I killed it long before it got to the end of the program or
memory. I seem to recall there being at least 500 reals.

--
Dave Boyd

Re: What is the stack size?

2009-06-20 by rickwendel763242

I'm slightly confused by this because on my old calculator if I put in for example: 1, enter, 2, enter, 3 enter, and so on more than 5 times it would roll over to the first level of the stack. So, are you saying that their are virtually unlimited levels? This would be good means I like using local variables for the most part and haven't yet seen a need for the newer style called combined local variables which act just like global variables with the exception, that they automatically purge themselves when the program terminates. Please reaffirm this.

Re: What is the stack size?

2009-06-20 by vincentgoudreault

--- In 50g@yahoogroups.com, "rickwendel763242" <rickwendel763242@...> wrote:
>
> I'm slightly confused by this because on my old calculator if I put in for example: 1, enter, 2, enter, 3 enter, and so on more than 5 times it would roll over to the first level of the stack. So, are you saying that their are virtually unlimited levels? This would be good means I like using local variables for the most part and haven't yet seen a need for the newer style called combined local variables which act just like global variables with the exception, that they automatically purge themselves when the program terminates. Please reaffirm this.
>


Up to and including the HP-41's, the stack was 4 layer deep (X, Y, Z and T as those were called). Remember that on those calculators, the stack could onlt contain a numerical value.

The HP48, 49 and 50 indeed have unrestricted stack, limited only to the amount of memory not being already used for other things. Each stack line can contain one object, which can be several different type, of varying size.


CBVG

Re: What is the stack size?

2009-06-20 by rickwendel763242

Wow! No more need for global variables! Yaaaaaaaaaaaaaaaa!!!!
I'm gaining a pretty good understanding of the stack objects and how they effect the stack.
Thanks a lot for your help!
I just started learning to program the calculator. It seems like you learn the most when you start doing that. Things just suddenly start to make sense a lot quicker. When I figure out some more stuff I'll post it in my folder for others to read. I have good notes that actually show what I've learned and can do and it shows the syntax of the program as well as a sample program and explanation.
I think everybody on here should do that, and soon we would really get somewhere with learning the calculator. I think HP should give novices better examples of the core programming stuff e.g. conditions with binary logic and loops and such... I promised myself that I wouldn't put down the crappy manuals HP puts out anymore. Even though they suck. And even though HP hires slave labor in foreign country sweat shops to write there materials.... And even though a 3rd grader with US citizenship could write a better manual. And even though when HP posted the want add for a technical writer in Iran they thought the word technical meant terrible. Not to put them down or anything.

Re: What is the stack size?

2009-06-21 by rickwendel763242

Thanks a lot Juan!
My old calculator had the limited stack or registers. I'm actively using the stack now in programs with the unlimited local variables and will be using the combined local variables soon.

Write now I'm trying to figure out how to write a program that analyzes a simple CASE statement. Can you check out the program in the Rick Wendel folder and see what I'm doing wrong?

Re: [50g] Re: What is the stack size?

2009-06-21 by Don Hart

I think you have an extra END.

--- On Sat, 6/20/09, rickwendel763242 <rickwendel763242@...> wrote:

> From: rickwendel763242 <rickwendel763242@...>
> Subject: [50g] Re: What is the stack size?
> To: 50g@yahoogroups.com
> Date: Saturday, June 20, 2009, 7:08 PM
> Thanks a lot Juan!
> My old calculator had the limited stack or registers. 
> I'm actively using the stack now in programs with the
> unlimited local variables and will be using the combined
> local variables soon.
>
> Write now I'm trying to figure out how to write a program
> that analyzes a simple CASE statement.  Can you check
> out the program in the Rick Wendel folder and see what I'm
> doing wrong?
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>     mailto:50g-fullfeatured@yahoogroups.com
>
>
>

Re: What is the stack size?

2009-06-21 by Don Hart

...and you need to think in RPN, it's...

A 2 *
not
A*2

and it's...
A 2 /
not
A/2

--- In 50g@yahoogroups.com, Don Hart <ddhart1@...> wrote:
>
>
> I think you have an extra END.
>
> --- On Sat, 6/20/09, rickwendel763242 <rickwendel763242@...> wrote:
>
> > From: rickwendel763242 <rickwendel763242@...>
> > Subject: [50g] Re: What is the stack size?
> > To: 50g@yahoogroups.com
> > Date: Saturday, June 20, 2009, 7:08 PM
> > Thanks a lot Juan!
> > My old calculator had the limited stack or registers. 
> > I'm actively using the stack now in programs with the
> > unlimited local variables and will be using the combined
> > local variables soon.
> >
> > Write now I'm trying to figure out how to write a program
> > that analyzes a simple CASE statement.  Can you check
> > out the program in the Rick Wendel folder and see what I'm
> > doing wrong?
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >     mailto:50g-fullfeatured@yahoogroups.com
> >
> >
> >
>

Re: What is the stack size?

2009-06-21 by Don Hart

Same goes for your test of the case...

A 5 <
not
A<5 etc.

You know, you can also put the expressions in ' ' as...

'A<5'

...if you don't want to write it in RPN

--- In 50g@yahoogroups.com, "Don Hart" <ddhart1@...> wrote:
>
> ...and you need to think in RPN, it's...
>
> A 2 *
> not
> A*2
>
> and it's...
> A 2 /
> not
> A/2
>
> --- In 50g@yahoogroups.com, Don Hart <ddhart1@> wrote:
> >
> >
> > I think you have an extra END.
> >
> > --- On Sat, 6/20/09, rickwendel763242 <rickwendel763242@> wrote:
> >
> > > From: rickwendel763242 <rickwendel763242@>
> > > Subject: [50g] Re: What is the stack size?
> > > To: 50g@yahoogroups.com
> > > Date: Saturday, June 20, 2009, 7:08 PM
> > > Thanks a lot Juan!
> > > My old calculator had the limited stack or registers. 
> > > I'm actively using the stack now in programs with the
> > > unlimited local variables and will be using the combined
> > > local variables soon.
> > >
> > > Write now I'm trying to figure out how to write a program
> > > that analyzes a simple CASE statement.  Can you check
> > > out the program in the Rick Wendel folder and see what I'm
> > > doing wrong?
> > >
> > >
> > >
> > > ------------------------------------
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >     mailto:50g-fullfeatured@yahoogroups.com
> > >
> > >
> > >
> >
>

Re: What is the stack size?

2009-06-22 by rickwendel763242

Thanks much! I got the program right on the first attempt after reviewing your comments. Check out my new download thing in my folder. Got any ideas on that?