50g group photo

Yahoo Groups archive

50g

Index last updated: 2026-04-28 22:38 UTC

Thread

Can anyone answer a question about compiled local variables?

Can anyone answer a question about compiled local variables?

2009-07-05 by rickwendel763242

I made a program that looks like this:  << Right Arrow (0 key) and a left arrow from the CHAR menu followed by X Y  << X Y + >> >>.  

1)  No matter what the program is doing it drops 1 number in the stack above it.  

2)  If you only enter two numbers and their is no number above the two level stack, you get an error.

3)  If you try to enter a number into the program before the point where the variables are initialized, all sorts of weird things happen and it won't let you.

4)  You don't end up with any extra variables at the end of the program execution but then again I don't think its actually acting as a compiled local variable with the left arrow added.  If you remove it and just use regular local variables theirs no problems.

5)  So, can anybody write a simple program using compiled variables so I don't have to PURGE all the variables I use all the time?

RE: [50g] Can anyone answer a question about compiled local variables?

2009-07-05 by Jeremy Hawdon

The left arrow on its own is a compiled local variable, and the X and Y are
non-compiled local variables. Hence 3 values are required for your program
to make the value assignments. You need two variables each with left arrow
as the first character in the name.

 

Jeremy

 

  _____  
Show quoted textHide quoted text
From: 50g@yahoogroups.com [mailto:50g@yahoogroups.com] On Behalf Of
rickwendel763242
Sent: 05 July 2009 21:11
To: 50g@yahoogroups.com
Subject: [50g] Can anyone answer a question about compiled local variables?

 






I made a program that looks like this: << Right Arrow (0 key) and a left
arrow from the CHAR menu followed by X Y << X Y + >> >>. 

1) No matter what the program is doing it drops 1 number in the stack above
it. 

2) If you only enter two numbers and their is no number above the two level
stack, you get an error.

3) If you try to enter a number into the program before the point where the
variables are initialized, all sorts of weird things happen and it won't let
you.

4) You don't end up with any extra variables at the end of the program
execution but then again I don't think its actually acting as a compiled
local variable with the left arrow added. If you remove it and just use
regular local variables theirs no problems.

5) So, can anybody write a simple program using compiled variables so I
don't have to PURGE all the variables I use all the time?

Re: [50g] Re: Can anyone answer a question about compiled local variables?

2009-07-06 by Don Hart

The left arrow becomes part of the name of the variable, e.g.
<< ->  <-X  <-Y  << <-X  <-Y  *  >>  >>
This takes 2 numbers off the stack.

--- On Sun, 7/5/09, rickwendel763242 <rickwendel763242@...> wrote:
Show quoted textHide quoted text
> From: rickwendel763242 <rickwendel763242@...>
> Subject: [50g] Re: Can anyone answer a question about  compiled local variables?
> To: 50g@...m
> Date: Sunday, July 5, 2009, 2:28 PM
> So, how do your store data in
> variables from the stack and use it anywhere in the program
> or sub-routines?  Where's the left arrow go?
> 
> 
> 
> ------------------------------------
> 
> Yahoo! Groups Links
> 
> 
>     mailto:50g-fullfeatured@yahoogroups.com
> 
> 
>

Re: Can anyone answer a question about compiled local variables?

2009-07-07 by Tim Wessman

> 5)  So, can anybody write a simple program using compiled variables so I don't have to PURGE all the variables I use all the time?

I will write one using a single command.

Type in 'PROG(X,Y)=X*Y^2' and then push DEF. PROG appears. Recall it an see that it looks like this. << -> X Y 'X*Y^2' >>

Here is another:

<< -> A B C << A 2 ^ B 2 ^ + C 2 ^ = >> >>

TW

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.