Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Thread: For enhanced loop

    by Norm
    Replies
    9
    Views
    1,054

    Re: For enhanced loop

    If 2.9 is to be used as 2, you could cast the double to an int.
  2. Thread: For enhanced loop

    by Norm
    Replies
    9
    Views
    1,054

    Re: For enhanced loop

    The enhanced loop in post#1 works.
    The problem is using a double to index an array. Array indexes should be int. If you must use a double you need to convert it to an int. What int value should...
  3. Thread: For enhanced loop

    by Norm
    Replies
    9
    Views
    1,054

    Re: For enhanced loop

    Yes
  4. Thread: For enhanced loop

    by Norm
    Replies
    9
    Views
    1,054

    Re: For enhanced loop

    You said:
    Can you post an example where a String is used as an index to an array? The code in post #3 does not use a String as an index. The code would look like this:

    anArray["a String"]
  5. Thread: For enhanced loop

    by Norm
    Replies
    9
    Views
    1,054

    Re: For enhanced loop

    Why are you using a double for an index to an array? That makes no sense.

    --- Update ---


    Can you post an example of that? I've always used only ints for array indexes.


    Yes an enhanced...
Results 1 to 5 of 5