Page 1 of 1

Posted: 24 May 2009, 15:37
by Gizzeta
Hi,

when the pass event flow or stop event flow don't output anythng, the lenght of the array is set to [-1].
Why [-1] and not [0]?
and why a module doesn't receive this change of data lenght?
I would like to do a module where if the lenght of the input is >= 1, do something, else do something else.
No matter if I set the lenght of the input = 0 at the end of every process function. But, is it normal? I mean, if a cable is not connected or a "pass" module doesn't pass anything, logically the input data lenght of my module would be automatically set to 0...

Posted: 24 May 2009, 21:37
by senso
the -1 length is define in Usine as a NULL_EVT as well as length=0.
it means that, if you receive this event you should do.. nothing...

we choose -1 because some array modules can accept array's with a length = 0.
so you can make a distinction.

Posted: 26 May 2009, 11:03
by Gizzeta
Thanks!