Re: Can types be global

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

Chris Bensler wrote:
> 
> Juergen Luethje wrote:
> > 
> > don cole wrote:
> > 
> > > Chris Bensler wrote:
> > >> 
> > >> Make sure typechecking is not disabled within the include file or any
> > >> files
> > >> it includes.
> > > 
> > > Would that be without type_check?
> > 
> > Yes.
> > 
> > > If so how can I override this.
> > > I can't find that in there but I would like to be sure with an override.
> > 
> > with type_check
> > 
> > see <<a
> > href="http://rapideuphoria.com/refman_2.htm#62">http://rapideuphoria.com/refman_2.htm#62</a>>
> > 
> > Regards,
> >    Juergen
> 
> You cannot override with or without type_check.
> You can turn typechecking on or off at different points in your program, but
> if a file contains a with/out type_check statement, there is no way to
> override
> that with an opposing statement.
> 
> What happens is that the part of code that is marked as 'without type_check'
> will never get type_checked, until the 'with type_check' statement is
> encountered,
> then all code until the next 'without type_check' or the end of the file, will
> be type_checked.
> 
> Clear as mud, right? :P
> 
> Chris Bensler
> ~ The difference between ordinary and extraordinary is that little extra ~
> <a href="http://empire.iwireweb.com">http://empire.iwireweb.com</a> - Empire
> for Euphoria

O.K. 



-----------include file (mygets.e}

global type caps(integer x) return x >= 'A' and x<= 'Z' end type

---------page1.e include myfile.e if caps(list[2][$]) then here I get error 'caps not declared' ---------main program

include mygets.e include page1.e


Would without type_check cause this error?

Thanks, Don Cole }}}

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

Search



Quick Links

User menu

Not signed in.

Misc Menu