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

  • 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:

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

    Best regards,
    Klaus

  • 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

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!