Post Reply 
Yes or No?
06-25-2014, 12:27 AM
Post: #1
Yes or No?
What is the best way to ask Yes or No for the 50G?
back in the day we hit the Y or the N (or any other) key but now i'm thinking we can do better.
I have this but its not great:
YN.txt
Code:

%%HP: T(3)A(R)F(.);
\<< "? YES OR NO?" + { { "YES" 1. } { "NO" 0. } } 1. CHOOSE DROP
\>>
it takes an 'argument' or "text" on level one and returns a 1 for yes or 0 for no.
i'm thinking of using TMENU and GETKEY but i'm not sure how (yet).
any ideas? <<yes or no>> ...or what are you using?
user RPL please

Thanks
~~~~8< Art >8~~~~

PS: Please post more 50G stuff :)
Find all posts by this user
Quote this message in a reply
06-25-2014, 02:20 AM
Post: #2
RE: Yes or No?
Hello,

You can modify this:

<<
{ " " " " " " " " "CANCL" "OK" }
TMENU
DO -1 WAIT
UNTIL
{ 15.1 16.1 }
SWAP POS
IF DUP
THEN 1 -
1
ELSE 1420 .074 BEEP
END
END
0 MENU
>>

From The HP 48 Handbook by James Donnelly.

Regards,

Mark
Find all posts by this user
Quote this message in a reply
06-25-2014, 03:01 AM
Post: #3
RE: Yes or No?
See also https://groups.google.com/forum/#!search...brmi81DtMJ.
Find all posts by this user
Quote this message in a reply
06-25-2014, 11:43 AM
Post: #4
RE: Yes or No?
(06-25-2014 02:20 AM)MNH Wrote:  Hello,

You can modify this:

<<
{ " " " " " " " " "CANCL" "OK" }
TMENU
DO -1 WAIT
UNTIL
{ 15.1 16.1 }
SWAP POS
IF DUP
THEN 1 -
1
ELSE 1420 .074 BEEP
END
END
0 MENU
>>

From The HP 48 Handbook by James Donnelly.

Regards,

Mark

Mr Donnelly is good, I made this from that:

Code:

%%HP: T(3)A(D)F(.);
\<< { "YES" "" "" "" "" "NO" } TMENU
  DO -1 WAIT
  UNTIL { 16.1 11.1 } SWAP POS
    IF DUP
    THEN 1 - 1
    ELSE 1420 .1 BEEP
    END
  END 0 MENU
\>>
I just thought there might be something even better that would present a pick list and a menu and would let you use the pick list OR the menu OR the Y or N button.

Thanks
~~~~8< Art >8~~~~

PS: Please post more 50G stuff :)
Find all posts by this user
Quote this message in a reply
06-25-2014, 10:41 PM
Post: #5
RE: Yes or No?
This is getting a little better, takes an text or arg from stack 1, it shows a tmenu and allows menu selection or Y or N key it returns a 1 for yes or a 0 for no.
Code:
%%HP: T(3)A(D)F(.);
\<< CLLCD "?
Yes or No" + 1 DISP { "YES" "" "" "" "" "NO" } TMENU
  DO -1 WAIT
  UNTIL { 16.1 42.1 64.1 11.1 } SWAP POS
    IF DUP
    THEN 1 - 1
    ELSE 1000 .07 BEEP
    END
  END 0 MENU 1.1 - SIGN
\>>
something tells me this has all been done before but i couldn't find anything with source code.

Thanks
~~~~8< Art >8~~~~

PS: Please post more 50G stuff :)
Find all posts by this user
Quote this message in a reply
06-26-2014, 02:42 AM
Post: #6
RE: Yes or No?
thanks for helping, here is what I have now.
Code:
%%HP: T(3)A(D)F(.);
\<< CLLCD "?
Yes or No" + 1 DISP { "YES" "" "" "" "" "NO" } TMENU
  DO -1 WAIT
  UNTIL { 16.1 42.1 102.1 64.1 11.1 92.1 } SWAP POS
    IF DUP
    THEN 3.1 - 1
    ELSE 1500 .1 BEEP
    END
  END 0 MENU SIGN \-> X 'X>0'
\>>
takes a string then asks for Y or N, Yes or No, 0 or 1 and returns 0 for no 1 for yes.

Thanks
~~~~8< Art >8~~~~

PS: Please post more 50G stuff :)
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)