Sie sind nicht angemeldet.

1

Donnerstag, 21. Januar 2016, 18:07

Is there a way to get the length of arguments?

Hi all,

do you know a way to get the lenght of the arguments of an action?

tried it with
_ get(%0.length)
_ get(%0.count)

but that doesnt work... *huh*
Any ideas?

Thanks for helping,
Steve

2

Donnerstag, 21. Januar 2016, 19:50

Hi,

that's directly not possible, because the %N arguments will be passed by 'inserting' the value directly in the code,

but it is 'indirectly' possible by using a temporary variable - e.g. this way:

Quellcode

1
2
set(arg1, '%1');
trace('arg1 length=', arg1.length);


Best regards,
Klaus

3

Donnerstag, 21. Januar 2016, 22:13

Hi Klaus,

ok, that`s good to know, but thats not directly the answer, perhaps I expressed my question not good enough:

I wanted the number of arguments in an action. Some of my actions have different numbers of arguments, and I want to count the total arguments...

This way I thought the length of the arguments in an action could be counted...

Steve