A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Mathematical Comparison

  1. #1
    Junior Member
    Join Date
    Apr 2003
    Posts
    27

    Mathematical Comparison

    hello!

    I have a doubt: i need to make a mathematical comparison between 2 numbers, using it in a if statement:

    shouldn't be:

    if (x > 10 && x < 12){
    trace(X)
    }

    returning the x number 11?

    Its not working! Can anybody help me out please. Thank you

  2. #2
    Monkey Moderator Lexicon's Avatar
    Join Date
    Jul 2001
    Location
    UK
    Posts
    2,038
    it will do if x is ever 11. Also there is a typo where you use lower case for comparrison but you trace uppercase!

    Code:
    for(x=0; x<20;x++)
    {
    	if (x > 10 && x < 12){
    		trace(x)
    	}
    }
    www.lexicon-design.co.uk
    If we aren't supposed to eat animals, then why are they made of meat?
    If Vegetarians like animals so much, why do they eat all their food?

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center