Skip navigation
Currently Being Moderated

Help with number

Apr 24, 2013 6:28 AM

I want to check for numbers in a "IF statement". Say if I got 0-10000 as a value, I want to only check for value between 1000-10000.

 
Replies
  • Currently Being Moderated
    Apr 24, 2013 6:31 AM   in reply to fsoender

    Have a go at writing the if statement yourself, then show us.

     

    There must be thousands  of examples of how to use the if statement and write conditional expressions on the web.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 24, 2013 7:19 AM   in reply to fsoender

    I don't understand what you're trying to do and you're still using incorrectly named variables.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 24, 2013 8:17 AM   in reply to fsoender

    G100 is a string so what kind of comparison are you trying to do?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 24, 2013 8:39 AM   in reply to fsoender

    I think I'll let someone braver than me try and help you.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 24, 2013 1:00 PM   in reply to fsoender

    I will only try to answer the first question, because I couldn't understand the later questions.

     

    > I want to check for numbers in a "IF statement". Say if I got 0-10000 as a value, I want to only check for value between 1000-10000.

     

    if (1000 <= value && value <= 10000)

     

    - Gordon

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points