FOR..NEXT Loop Bug?


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: FOR..NEXT Loop Bug?

    Hi Mike,

    The syntax is ...

    FOR i = 32 to 37
    DT

  2. #2
    Join Date
    Jun 2006
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Re: FOR..NEXT Loop Bug?

    Thank you Darrel, dumping the i= does correct the problem. I don't do much programing in basic, primarily in c and java. I guess I need to pay a bit more attention. Just one question shouldn't the compiler throw a syntax error? With the improper syntax it compiles without error.

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: FOR..NEXT Loop Bug?

    Quote Originally Posted by MSapper View Post
    Just one question shouldn't the compiler throw a syntax error? With the improper syntax it compiles without error.
    Well no ..., What you had wasn't "Invalid Syntax". In fact it was quite legal.
    It just didn't make sense for what you wanted to do.

    Logical operators return numbers that can be interpreted as True or False, but those numbers can be used for other purposes as well.
    It's up to the programmer to determine when they are appropriate.

    If it threw an error, some ingenious person would find a valid use for a logical operator in a FOR loop, and they'd be really ticked off when it didn't work.
    DT

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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