![]() The (initget)/(getkword) approach will ask the question again, until it gets a valid answer.Ī lesser advantage is that it will return “Yes” whether the User types “Y” or “y” or “Yes” or “yes” or even “Ye” or “yE,” and similarly with case differences and number of letters in answering “No” - as long as it starts with the capitalized letter(s) in (initget) and if it continues, doesn’t do so with any character(s) that are NOT a continuation of the word there, regardless of case, it will return the word in the case combination it has there. In Murra圜’s code, if you INTEND to answer “Yes,” but accidentally hit some adjacent key instead, it will take any of those as a “No,” and you’ll need to follow up by erasing the Solid separately. The big advantage of (initget)/(getkword) is that it WON’T ACCEPT invalid answers to its question. (command “_.erase” solid “”) or (entdel solid) (if (/= (getkword “\nDo you want to erase the Solid ? : “) “No”)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |