1. scope of global type function

Hello,

I'm trying to use Eu4.02a with my application wrote with Eu3.1.

I've the error in ex.err file : "type_check failure" when i comment the include statement in the test_variable_type.ew programme. Is it a misunderstood of the scope of the global type function or a bug in Eu4.0 ?

Below the 3 files of my test. the EUDIR system variable is used to point to the new version of Euphoria. The 2 include files are in my include directory pointed to by the EUINC system variable.


test_variable_include.ew :

global type TestType(object ent0)  
    if sequence(ent0) and length(ent0) = 2 then  
        return 1  
    end if  
    return 0  
end type  


test_variable_type.ew :

--include test_variable_include.ew  
global function FormatSeqWithType(TestType ent1)  
    return ent1[1]&ent1[2]  
end function 


test_variable_main.exw :

include test_variable_include.ew  
include test_variable_type.ew  
  
sequence type_result   
TestType type_variable  
type_variable={"a","b"}  
type_result=FormatSeqWithType(type_variable)  
printf(1,"%s\r\nPress....that's all",{type_result})  
if getc(0) then end if  
new topic     » topic index » view message » categorize

2. Re: scope of global type function

PtitChaud said...

I'm trying to use Eu4.02a with my application wrote with Eu3.1.

I've the error in ex.err file : "type_check failure" when i comment the include statement in the test_variable_type.ew programme. Is it a misunderstood of the scope of the global type function or a bug in Eu4.0 ?

No, you correctly understand the global scope. This is bug #22, which has been fixed in the svn repository.

It should be noted, however, that while leaving out the include statement is valid euphoria code, it's better to have the include statement.

Matt

new topic     » goto parent     » topic index » view message » categorize

3. Re: scope of global type function

Thank's for your answer and your time.

PtitChaud.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu