User-defined functions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

User-defined functions

bene
Hi all,

i wrote a makro and therefor used a  user defined function...

function index(a, value) {
      for (i=0; i<a.length; i++)
          if (a[i]==value) return i;
      return -1;
  }
and its call


to get the index of an array value.

If i run the makro it fails as well as in clipboard debug-mode.

If i outcomment this function the makro works fine.

Any ideas what could be wrong??

thanks in advance,
bene
Reply | Threaded
Open this post in threaded view
|

Re: User-defined functions

Tchoukatroc
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: User-defined functions

bene
Hi,

thx for your reply....
well a.length works fine...
i became accustomed to declare variables and so i did like...

var image = .....

i erased this var declaration and now it works fine... :D