That was fast.
Thank you Adrian!


-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Adrian Pop
Gesendet: Montag, 20. Oktober 2008 13:25
An: [email protected]
Betreff: Re: External functions without arguments are not found


Hi,

I found and corrected the bug.
I'll test it a bit more before I commit the fix.
I'll then generate a new nightly-build later today
and get back to you when is available.

Cheers,
Adrian Pop/

Adrian Pop wrote:
> 
> Hi,
> 
> This is clearly a funny bug. It should work.
> I'll have a look at it and let you know when
> is fixed.
> 
> Cheers,
> Adrian Pop/
> 
> [EMAIL PROTECTED] wrote:
>> Hi,
>>
>> I tried the ExternalLibraries example from the User Guide in the
>> testmodels directory of the 1.4.4 release. It worked fine.
>>
>> Then I wanted to change one function to take no arguments. That
>> didn't work. Did I do something wrong or is this a bug? Description
>> follows.
>>
>> Regards, Alexander
>>
>>
>> I changed ExternalFunc1_ext() to take no arguments. Changed all the
>> signatures and implementations. Like in the C file:
>>
>> double ExternalFunc1_ext() { return 2; }
>>
>> And in the model:
>>
>> function ExternalFunc1 output Real y; external y=ExternalFunc1_ext() 
>> annotation(Library="libExternalFunc1_ext.o", 
>> Include="#include\"ExternalFunc1_ext.h\""); end ExternalFunc1;
>>
>> With a later call to:
>>
>> der(x)=-ExternalFunc1();
>>
>> Running the script gives off:
>>
>> >> runScript("ExternalLibraries.mos") "true 0 0 record resultFile =
>> "Simulation failed. No matching function found for ExternalFunc1() of
>> type function() => Real, candidates are function() => Real Error
>> occured while flattening model ExternalLibraries " end record
>>
>> true"
>>

Reply via email to