Re: How to use constants in a case key form ?



On Nov 23, 1:20 pm, Frank Goenninger DG1SBG <dont-email...@xxxxxxxxxx>
wrote:
So far so bad. I have a real bunch of defconstants (about 200)
so... How do I get to use theconstantsin mycasekey forms?


One way is to write your own case macro. Another is to evaluate the
constants at read time.

CL-USER> (defconstant +first+ 1)
+FIRST+
CL-USER> (let ((x 1))
(case x
(#.+first+ 'first!)
(t 'something-else!)))
FIRST!

This assumes that the constants are available when the case form is
read. It also assumes you recompile the forms that depend on the
constants if you change the constants.

The discussion "Putting evaluated constants in a CASE" from 2004 in
this newsgroup may be helpful.


.



Relevant Pages

  • Re: Spell Check Protected Form with Bookmarks
    ... You might also name your starter macro ToolsProofing. ... Microsoft's Legal Users' Guide) http://addbalance.com/usersguide ... This message is posted to a newsgroup. ... Bookmarks are not set to calculate on exit. ...
    (microsoft.public.word.spelling.grammar)
  • Re: Help finding autocorrect registry settings
    ... If you record the macro as mentioned in the article you can edit it in the ... This message is posted to a newsgroup. ... > The students log in with a unique login id. ... >>from my ignorance and your wisdom. ...
    (microsoft.public.word.customization.menustoolbars)
  • Re: Help finding autocorrect registry settings
    ... If you record the macro as mentioned in the article you can edit it in the ... This message is posted to a newsgroup. ... > The students log in with a unique login id. ... >>from my ignorance and your wisdom. ...
    (microsoft.public.word.customization.menustoolbars)
  • Re: Macro Text on Command Button gone in email
    ... Word New User FAQ & Web Directory: http://addbalance.com/word ... Microsoft's Legal Users' Guide) http://addbalance.com/usersguide ... This message is posted to a newsgroup. ... That said, though, make sure either way that your macro is stored in your ...
    (microsoft.public.word.docmanagement)
  • Re: VBA Word 2003 File Close
    ... Earlier to day I created the following code to help someone in the mailmerge.fields newsgroup overcome a problem with documents that he was inserting into another document were losing their margin settings. ... You will not that it uses Source.Close wdDoNotSaveChanges and that does not cause an error. ... Doug Robbins - Word MVP, ... It is very weird because the Macro runs fine if I just use F5. ...
    (microsoft.public.word.vba.general)