No method "call" in scripting

Hi all,

I played around a bit with scripting and tried to use a self defined function, just a simple thing like

  void test() {
    print.ln("I'm in test")
  }
and than call it via:

  call test()
as described in the Component Builders Manual in section 3.5

The log tels me:

  Parse error at line 11: Semantic error: function test redefined.
When I put "export" in front of the function and omit the "call" all works fine.

Looks like the "call" statement is not implemented ??

Ciao Joerg

No method "call" in scripting

On Sun, Jun 19, 2011 at 12:21 PM, <joerg [..] ...> wrote:
> Hi all,
>
> I played around a bit with scripting and tried to use a self defined function, just a simple thing like
>
>  void test() {
>    print.ln("I'm in test")
>  }
>
> and than call it via:
>
>  call test()
>
> as described in the Component Builders Manual in section 3.5
>
> The log tels me:
>
>  Parse error at line 11: Semantic error: function test redefined.
>
> When I put "export" in front of the function and omit the "call" all works fine.
>
> Looks like the "call" statement is not implemented ??

I think you can only use call inside a program/function body. Thinking
over call vs export again, I would deprecate call and by default make
functions 'callable' (but without the call keyword) and give 'export'
the meaning of 'attach function to public interface of current
TaskContext'.

I think this is only a minor change in the scripting implementation,
so if you make a bug report for this (or figure it out yourself) we
can fix this quite quickly.

Peter
--
Orocos-Users mailing list
Orocos-Users [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users