function parameters

Results 1 to 3 of 3

Thread: function parameters

  1. #1
    Join Date
    Dec 1969

    Default function parameters

    i am having some difficulties with a simple function call. i have checked the faq and checked out numerous examples but cant figure out what im doing wrong.<BR><BR>the function is defined as <BR>FUNCTION FindChild(index,depth)<BR><BR>The call is <BR>FindChild(ThreadIndex,depth+1)<BR><BR>The error msg is<BR>Cannot use parentheses when calling a Sub<BR><BR>What am i doing wrong?

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default What you are doing wrong??

    you are using parentheses when calling a Sub....or was that error message tough to understand :)<BR><BR><BR>what you need to do is<BR>FindChild ThreadIndex,depth+1<BR>OR<BR>call FindChild(ThreadIndex,depth+1)<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default grasshopper

    Basically:<BR><BR>If you are returning a value, you have to set it to something... so you need something like<BR><BR>blah = FindChild(ThreadIndex, depth + 1)<BR><BR>If you *aren&#039;t* returning anything from the FindChild function, then you need to call it without the parens...<BR><BR>FindChild ThreadIndex, depth + 1<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts