Sign in to follow this  
Followers 0
Der_Andi

Is True/False the same as 0/1 ?

4 posts in this topic

Hi,

i just wrote the following code:

If IniRead("settings.ini", "general", "running", 0) Then
    MsgBox(0, "Info", "Program is running.")
    Exit
Else
    IniWrite("settings.ini", "general", "running", 1)
EndIf

The specified txt-file does not exist. FileExists() returns 0 here and the Else-part is being executed as expected.

Andi

Share this post


Link to post
Share on other sites

To answer your question with code

msgbox(48, "True == 1 ???", True == 1)
; But 
If 1 Then 
    msgbox(48, "1| evalutes to true")
Else
    msgbox(48, "1| evalutes to False")
EndIf

Share this post


Link to post
Share on other sites

Hi,

i just wrote the following code:

If IniRead("settings.ini", "general", "running", 0) Then
    MsgBox(0, "Info", "Program is running.")
    Exit
Else
    IniWrite("settings.ini", "general", "running", 1)
EndIf

Share this post


Link to post
Share on other sites

Got it. Thanks :shocked:

Share this post


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
Sign in to follow this  
Followers 0