Re: type checking ?
- Posted by Bernie Ryan <xotron at blu?frog.c?m> Nov 25, 2007
- 608 views
Matt Lewis wrote: > > Bernie Ryan wrote: > > > > Matt Lewis wrote: > > > > > > > > Why do you need to pass a parameter if you want to force them to > > > pass a specific constant? > > > > Matt: > > > > <code> > > <snipped> > > > -- These are ok > > useit(strConstant1) > > useit(strConstant2) > > useit(strConstant3) > > > > -- THIS IS WRONG BECAUSE OF THE QUOTES, I DO NOT WANT TO PROCESS THIS. > > > > useit("strConstant1") > > > > </code> > > OK, once again, you've answered the what, but not the why. I'll play > dentist now and ask some more focused questions. > > Where did file1, etc come from? Are these user files? Are they part > of your library? file1 is a resource file created by the user using a utility program. > Why is the distinction between a constant and a literal sequence important > to useit? > useit() is a procedure in a library that is being used by the user. > You say that you don't want to process a literal sequence. Please explain > the reason behind this. > I do not know in advance what constant name will generated by the user generating the file. So I was trying to type-check so the user entered the constant token name. I think a figured away around it by having the utility embed a unique indentifier in the generated sequence constant string. Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan