very simple lisp

I can
(setq    mul (strcase (getstring "\n Mulls? Y/N: ")))
and the Yes / No does what I expect.
but to have more options, say when I
(initget 1 "R L N")      (setq hinge (strcase (getkword "\n Hinge? Right/Left/None: "))) )
that will fly.
getstring seems to have an exception for Y/N that WILL NOT apply to R/L.
don't see anything in the help files, is this all there is, or am I still missing some minutia?
thanks,
roy
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Did you set it up with an INITGET line? BTW why the STRCASE?
--


MichaelB
www.michaelbulatovich.ca
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Michael Bulatovich wrote:

when I use STRCASE it forces the text inputed to be caps, so I don't need something like:
(cond (or (= mull "y") (= mull "Y")) ...... )
not good?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
It's perfectly fine. I *read* STRCASE, I even typed STRCASE, but in my head it was definitely STRCAT when I asked the question! My mistake.
--


MichaelB
www.michaelbulatovich.ca
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Michael Bulatovich wrote:

you know, as I was typing in the code, I made the same mistake on one line. took forever to debug that line 'cos it looked right to these old eyes.
:)
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
(initget "Yes No") will enable the subsequent (getkword ...) statement to recognize any of the following:
Yes No Y N y n ... so the (strcase ...) function is redundant. ___

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
roy wrote:

oops, I need initget. don't know how I was deceived that the first one was working. irreproducable, that one.
and I need getkword. OK.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Also in your initget you can use the full word. (initget 1 "Right Left None") The capital letters represent the minimum that needed to be type. But the user can type the whole word.
Plus if you place the options in square brackets you can right click to select them (or in 2006 DYN they will pop up) - (setq hinge (strcase (getkword "\n Hinge? [Right/Left/None]: "))) One other note, the STRCASE forces the user to only use capital letters. I would suggest dropping that. If you are using it to validate the selection later in the LISP, convert it later.
Daniel Hargreaves, CSI, CDT, RAS http://www.archsymb.com

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.