Re: Toggle Keys Revisited - Hewlett Packard

This is a discussion on Re: Toggle Keys Revisited - Hewlett Packard ; On Sun, 09 Nov 2008 16:06:37 -0600, Mark wrote: >> { "0" } TMENU >> >> 1 'lbln' STO @ label number within current menu > I STOred this as >. Is that correct? What for? That was just an ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Re: Toggle Keys Revisited

  1. Re: Toggle Keys Revisited

    On Sun, 09 Nov 2008 16:06:37 -0600, Mark wrote:

    >> { "0" } TMENU
    >>
    >> 1 'lbln' STO @ label number within current menu


    > I STOred this as << { "0"} TMENU >>. Is that correct?


    What for? That was just an example of a menu, to test with.

    > I STOred << { A B "0" C D E } TMENU >> in a variable
    > I named TOGL.
    >
    > So far okay?


    What for? That was just an example of a menu, to test with.

    > How do I implement this? I was thinking that each of
    > the 4 choices ( 1/2" 1/4" 1/8" 1/16") would
    > set a user flag (1/2" would set flag 1, 1/4"
    > would set flag 2, etc.) so when, say a CASE
    > structure comes along in my program, the
    > dimension might be displayed to the nearest
    > 1/8" if I chose 1/8".


    I used no flags, and require no CASE logic in your program.

    If you want to try my scheme,
    store the programs 'getm' 'getv' and 'togv' as posted.

    Make _your_ menu the current menu using:

    { your menu } TMENU

    Your menu may contain any "dummy" definition
    for the special variable menu key (my examples used the label "0")

    If you have nothing else to define in your own menu,
    you can use a menu containing only one item, e.g.

    { "0" }

    Store the position number of the special label to be toggled
    into variable 'lbln' (as was shown in previous posts);
    for the one-item menu above, the position number would be 1.

    Call program 'togv' once initially,
    to set up the special menu key,
    set an initial changeable label, and store its value.

    Press the given menu key to both toggle its label
    (performed by program 'togv') and to store its value
    into variable 'tolv' (performed by program 'getv'
    which in turn is automatically called by 'togv'
    which in turn is invoked by just pressing the special menu key).

    E.g. if the special label is currently diplaying "1/4"
    then variable 'tolv' contains the value 0.25
    representing the numeric value of the displayed label.

    Every time you press the special label key in the current menu,
    both the displayed label and its stored value are simultaneously changed.

    Your program can use the stored value in its own calculations.

    Does that work well enough?

    ---

    Thanks for quoting the original posts,
    since "Google Groups," the only long-term archiver of newsgroups,
    has just replaced its once perfectly working "advanced search" form
    (and perhaps the indexing which made it work)
    with something that is utterly broken,
    and can't find anything at all for me!

    [r->] [OFF]

  2. Re: Toggle Keys Revisited

    On Nov 9, 6:44*pm, "John H Meyers" wrote:
    > On Sun, 09 Nov 2008 16:06:37 -0600, Mark wrote:
    > >> { "0" } TMENU

    >
    > >> 1 'lbln' STO @ label number within current menu

    > > I STOred this as << { "0"} TMENU >>. Is that correct?

    >
    > What for? *That was just an example of a menu, to test with.
    >
    > > I STOred << { A B "0" C D E } TMENU >> in a variable
    > > I named TOGL.

    >
    > > So far okay?

    >
    > What for? *That was just an example of a menu, to test with.
    >
    > > How do I implement this? I was thinking that each of
    > > the 4 choices ( 1/2" 1/4" 1/8" 1/16") would
    > > set a user flag (1/2" would set flag 1, 1/4"
    > > would set flag 2, etc.) so when, say a CASE
    > > structure comes along in my program, the
    > > dimension might be displayed to the nearest
    > > 1/8" if I chose 1/8".

    >
    > I used no flags, and require no CASE logic in your program.
    >
    > If you want to try my scheme,
    > store the programs 'getm' 'getv' and 'togv' as posted.
    >
    > Make _your_ menu the current menu using:
    >
    > { your menu } TMENU
    >
    > Your menu may contain any "dummy" definition
    > for the special variable menu key (my examples used the label "0")
    >
    > If you have nothing else to define in your own menu,
    > you can use a menu containing only one item, e.g.
    >
    > { "0" }
    >
    > Store the position number of the special label to be toggled
    > into variable 'lbln' (as was shown in previous posts);
    > for the one-item menu above, the position number would be 1.
    >
    > Call program 'togv' once initially,
    > to set up the special menu key,
    > set an initial changeable label, and store its value.
    >
    > Press the given menu key to both toggle its label
    > (performed by program 'togv') and to store its value
    > into variable 'tolv' (performed by program 'getv'
    > which in turn is automatically called by 'togv'
    > which in turn is invoked by just pressing the special menu key).
    >
    > E.g. if the special label is currently diplaying "1/4"
    > then variable 'tolv' contains the value 0.25
    > representing the numeric value of the displayed label.
    >
    > Every time you press the special label key in the current menu,
    > both the displayed label and its stored value are simultaneously changed.
    >
    > Your program can use the stored value in its own calculations.
    >
    > Does that work well enough?
    >
    > ---
    >
    > Thanks for quoting the original posts,
    > since "Google Groups," the only long-term archiver of newsgroups,
    > has just replaced its once perfectly working "advanced search" form
    > (and perhaps the indexing which made it work)
    > with something that is utterly broken,
    > and can't find anything at all for me!
    >
    > [r->] [OFF]


    Thank you for the rapid response to my query! I'll get to work
    with your code and see what happens. I think you're going to
    get me hooked on SysRPL!

  3. Re: Toggle Keys Revisited

    On Sun, 09 Nov 2008 18:15:42 -0600, Mark wrote:

    > I'll get to work with your code and see what happens.
    > I think you're going to get me hooked on SysRPL!


    I guess all that _UserRPL_ must have turned you
    to look for something else, then

    [r->] [OFF]

+ Reply to Thread