Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Replies
    5
    Views
    1,050

    Re: Returning An Array

    If you don't change the value of the index to the array, all the values go into the same slot in the array.

    For debugging print out the contents of the array after its been filled.
    For example: ...
  2. Replies
    5
    Views
    1,050

    Re: Returning An Array

    The array reference is missing the index. Put an index inside the []s

    BTW Any statement following a return statement will NOT be executed.
  3. Replies
    5
    Views
    1,050

    Re: Returning An Array

    To return the contents of a variable, put the variable name after the return:

    return theVarToReturn;
    The method definition statement needs to include the type of the data being returned.
Results 1 to 3 of 3