Jump to content

Recommended Posts

Posted

Please explain why the $ y in the first case is equal to 3 and the second 2?  :blink:

How to make the code to work correctly?

Thanks you!

$x = 10.1

Switch $x
    Case 0 To 10
        $y = 1
    Case 11 To 60
        $y = 2
    Case Else
        $y = 3
EndSwitch

MsgBox(0,"false",$y)

$x = 11.1

Switch $x
    Case 0 To 1
        $y = 1
    Case 11 To 60
        $y = 2
    Case Else
        $y = 3
EndSwitch

MsgBox(0,"true",$y)

 

 

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

  • Moderators
Posted

@AndreyS, in the future, rather than deleting your topic, how about posting your solution? Then someone can benefit from your understanding in the future ;)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Posted

Understood, JLogan3o13!
Simply, it was a topic that is talked about a simple mistake.
I immediately noticed the obvious. Probably due to the fact that I lost my attention for a long time programming. :D
I would not want to clutter up the forum such errors.

In general, users can delete topics?

  • Moderators
Posted

No, but we tend to leave topics out there for others who may be searching. We've all had the a-HA moment as soon as we post something, but you never know when someone else is going to learn from your post :)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...