Re: type checking ?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Derek Parnell wrote:
> 
> Bernie Ryan wrote:
> > The useit() procedure will try to process the sequence weather it is
> > a constant name sequence or the actual constant sequence because they
> > depending how the user calls the procedure.
> > I do not know in advance what the constant sequence will be because it is
> > added by the user via include file. 
> > Of course if user passes the name as a sequence the procedure will crash. 
> > I will just have to spell it out in the users manual and
> > HOPE that they read it. 
> 
> 
> I'm still trying to work out Bernie's issue but here's what I've got so far...
> 
> Bernie has a file that is something like this ...
> 
> ------------ start of bernie's file
> include userfileA.e
> 
> global function/procedure useit(sequence x)
>  <some processing goes here>
> end function/procedure
> 
> include userfileB.e
> ------------- end of file
> 
> And a user of Bernie's application must supply a couple of include files.
> 
> ------ start of userfileA.e
> global constant WhatEver = "some text"
> ------ end of  userfileA.e
> 
> ------ start of userfileB.e
> useit(WhatEver)
> ------ end of  userfileB.e
> 
> Now the problem is that Bernie want to make sure that in userfileB, the user
> codes ...
> 
>    useit(WhatEver)
> 
> and never codes ...
> 
>    useit("WhatEver")
> 


Derek:

   Thanks for explaining it.

   That is exactly what I mean.

   How can you be sure that a user enters the token WhatEver which

   represents a string constant and not the string "WhatEver"

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu