Re: Can types be global? still have same problem

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

don cole wrote:
> 
> Here is my set up. I can’t find any without type_check anywhere.
> }}}
<eucode>
> ---------------mygets.e-------------
> global type caps(integer x)
>   return x >= 'A' and x<= 'Z'
> end type
> 
> ---------------page1.e--------------
> include mygets.e as mg
> 
> if mg:caps(list[2][$]) then—--get error here caps not declared
> 
> ----------------main prog-----------
> 
> include mygets.e as mg
> include page1.e
> 
> 
> Any help appreciated.
> 
> Don Cole

Hi Don,

If I run your above program I get:

-------
list has not been declared
if mg:caps(list[2][$]) then
-------

If I declare a list in page1.e as:

sequence list
list = {1,{2,3,4},3,4,5}

It all seems to work.

I'm using version 3.0.0

Regards,


Ray Smith
http://RaymondSmith.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu