From: n6vc on
I am trying to create a program for doing machine alignment. The
program works OK, but I am trying to improve the user interface. I
would like to re-display global variables for some measurements, but
when I include them, they show as the variable name instead of the
value.
Here is a snipet of code that assumes Global Variables A, B, C, D, E,
and BarSag have been created with numeric values.
\<<
"Foot Measurement"
{ { "A:" "Moveable Foot, Outboard to Inboard" } { "B:" "Movable Foot,
Inboard to Dial X" } { "C:" "Dial X to Dial Y" } { "D:" "Dial Y to
Fixed Foot, Inboard" } { "E:" "Fixed Foot, Inboard to outboard" }
{ "BarSag" "Measure Bar Sag" } }
{ 2 1 }
{ A B C D E BarSag }
{ A B C D E BarSag }
INFORM
DROP
EVAL
\>>
Any help would be appreciated.
Thanks,
Jon
From: andreas_moellerNOSPAM on
Hello,

IIRC the USER-RPL command INFORM takes what ever is in the list (if it
is a valid list).

If you want the _value_ of the variables display you have to something
like this (assuming that the variables exist and that they contain a
numeric value)

An example:
A B C D E BarSag
Now the values of these global variables are on the stack, highest is
A, lowest is BarSag.
Now you can build a list of these six arguments which would contain
the numeric arguments, for example { 1 2 3 4 5 6 }.

You can´t have a static list if you want the value displayed, so you
have to program something that is dynamic and end ups with your
desired list.

HTH,
Andreas
http://www.software49g.gmxhome.de

From: PremiumBlend on
On Sep 15, 8:36 am, n6vc <jmcfa...(a)kcc.com> wrote:
> I am trying to create a program for doing machine alignment. The
> program works OK, but I am trying to improve the user interface. I
> would like to re-display global variables for some measurements, but
> when I include them, they show as the variable name instead of the
> value.
> Here is a snipet of code that assumes Global Variables A, B, C, D, E,
> and BarSag have been created with numeric values.
> \<<
> "Foot Measurement"
> { { "A:" "Moveable Foot, Outboard to Inboard" } { "B:" "Movable Foot,
> Inboard to Dial X" } { "C:" "Dial X to Dial Y" } { "D:" "Dial Y to
> Fixed Foot, Inboard" } { "E:" "Fixed Foot, Inboard to outboard" }
> { "BarSag" "Measure Bar Sag" } }
> { 2 1 }
> { A B C D E BarSag }
> { A B C D E BarSag }
> INFORM
> DROP
> EVAL
> \>>
> Any help would be appreciated.
> Thanks,
> Jon

Hello,

Would you be kind enough to post an actual example?

Regards,

Mark
From: David Brigada on
PremiumBlend wrote:
> On Sep 15, 8:36 am, n6vc <jmcfa...(a)kcc.com> wrote:
>> I am trying to create a program for doing machine alignment. The
>> program works OK, but I am trying to improve the user interface. I
>> would like to re-display global variables for some measurements, but
>> when I include them, they show as the variable name instead of the
>> value.
>> Here is a snipet of code that assumes Global Variables A, B, C, D, E,
>> and BarSag have been created with numeric values.
>> \<<
>> "Foot Measurement"
>> { { "A:" "Moveable Foot, Outboard to Inboard" } { "B:" "Movable Foot,
>> Inboard to Dial X" } { "C:" "Dial X to Dial Y" } { "D:" "Dial Y to
>> Fixed Foot, Inboard" } { "E:" "Fixed Foot, Inboard to outboard" }
>> { "BarSag" "Measure Bar Sag" } }
>> { 2 1 }
>> { A B C D E BarSag }
>> { A B C D E BarSag }
>> INFORM
>> DROP
>> EVAL
>> \>>
>> Any help would be appreciated.
>> Thanks,
>> Jon
>
> Hello,
>
> Would you be kind enough to post an actual example?
>
> Regards,
>
> Mark

With { A B C D E BarSag } on the stack, how about

\<< \<< EVAL \>> DOLIST \>>

?

-Dave
From: andreas_moellerNOSPAM on
Hello,

there are lots of different ways to do it.

This is the example of your code. Note that the testing of the
variables does not check whether this is a numeric value or not. You
have to add this check to be sure that you have a numeric value
delivered. Also note that there are real numbers and ZINTs available
as numeric input.

HTH,
Andreas

P.S. The USER-RPL code has room for many improvments as I am not used
to programming in it, in SYS-RPL this could be done much more
elegantly...

\<< "Foot Measurement" { { "A:" "Moveable Foot, Outboard to Inboard" }
{ "B:" "Movable Foot,
Inboard to Dial X" } { "C:" "Dial X to Dial Y" } { "D:" "Dial Y to
Fixed Foot, Inboard" } { "E:" "Fixed Foot, Inboard to outboard" }
{ "BarSag" "Measure Bar Sag" } } { 2 1 } { A B C D E BarSag }
IFERR 'A' RCL
THEN DROP 0.000000
END
IFERR 'B' RCL
THEN DROP 0.000000
END
IFERR 'C' RCL
THEN DROP 0.000000
END
IFERR 'D' RCL
THEN DROP 0.000000
END
IFERR 'E' RCL
THEN DROP 0.000000
END
IFERR 'BarSag' RCL
THEN DROP 0.000000
END 6 \->LIST INFORM 1.000000
IF ==
THEN EVAL
END
\>>