1. Won't compile and no error messages returned

Hi,

I'm using OpenEuphoria v4.0.5. on a Windows7 platform.

Normally I can compile my eucode without problems, but it seems I've done something with my code that inhibit the compiler from doing its job all of a sudden.

I can create a simple program and compile it, but for the project I'm currently working on, the compiler do not compile the code, nor give me any error-messages what so ever.

Have anyone of you experienced this?

Regards, Kenneth aka ZNorQ

new topic     » topic index » view message » categorize

2. Re: Won't compile and no error messages returned

ZNorQ said...

Hi,

I'm using OpenEuphoria v4.0.5. on a Windows7 platform.

Normally I can compile my eucode without problems, but it seems I've done something with my code that inhibit the compiler from doing its job all of a sudden.

I can create a simple program and compile it, but for the project I'm currently working on, the compiler do not compile the code, nor give me any error-messages what so ever.

Have anyone of you experienced this?

Regards, Kenneth aka ZNorQ

I found out what the cause was, but I don't understand the reason. Basically we're talking about 3 files;

Main executable
- Include w/various variable/constant declarations (global/public)
- Include w/core function(s)

The declaration file contains a string-variable with the name of a core function.
The main executable uses a walk_dir() function, which again uses routine_id().
Routine ID uses the string-variable instead of a hard-coded string (pointing to a function in core-func. include file).

This does not compile. I had to move the declaration to the main-file for it to work.

Kenneth aka ZNorQ

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

3. Re: Won't compile and no error messages returned

sorry, no understand the problem, i dont know english.

with sequence elements, compile Ok (????) translator bug?

-- file1.e 
public sequence s  = {"func1", "func2"} 
public sequence s1 = s[1] 
public sequence s2 = s[2] 
 
-- file2.e 
public function func1() 
    return {1,2,3} 
end function 
 
public function func2() 
    return 25 
end function 
 
-- file.ex 
include file1.e 
include file2.e 
 
--atom x = routine_id(s1)   -- translator (segfault), eui Ok 
atom x = routine_id(s[1])   -- translate, compile and run Ok 
 
puts(1, s[1] & ", " & s[2] & 10) 
puts(1, s1 & 10) 
puts(1, s2 & 10) 
 
? call_func(x, {}) 
x = routine_id(s[2]) 
? call_func(x, {}) 
 
/* 

Output: 
func1, func2 
func1 
func2 
{1,2,3} 
25 
*/ 
new topic     » goto parent     » topic index » view message » categorize

4. Re: Won't compile and no error messages returned

Bug reported: http://openeuphoria.org/ticket/908.wc

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

5. Re: Won't compile and no error messages returned

a workaround using namespaces:

include defs.e  as def  -- constants, variables 
include funcs.e         -- functions 
 
res = call_func(routine_id(def:varname), {...}) 
new topic     » goto parent     » topic index » view message » categorize

6. Re: Won't compile and no error messages returned

cargoan said...

a workaround using namespaces:

include defs.e  as def  -- constants, variables 
include funcs.e         -- functions 
 
res = call_func(routine_id(def:varname), {...}) 

Hi, you're correct, that actually worked. I assume this is a bug (saw your ticket). Thanks for the feedback. :)

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

Search



Quick Links

User menu

Not signed in.

Misc Menu