Jump to content

Recommended Posts

Isn't this acting like an Exit(0)?

<{POST_SNAPBACK}>

It should be, but it doesn't. It seems to exit the main loop, but doesn't actually return the value to the system. That to me is the error.

Compile this or it won't work:

If $CmdLine[0] > 0 Then
    MsgBox(4096, "", "Returning 100")
    Return 100
Else
    MsgBox(4096, "Returned", RunWait(@ScriptFullPath & " blah"))
EndIf

My expectation is that the second MsgBox should say 100, but it says 0. At global scope, Return should be the same as Exit including passing the return value to the system.

Link to post
Share on other sites

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...