01.09.2014 Views

WM Basic™ User's Manual - Classes

WM Basic™ User's Manual - Classes

WM Basic™ User's Manual - Classes

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 2 Nothing (constant) 349<br />

Example<br />

'This example demonstrates the use of the Not operator in comparing<br />

'logical expressions and for switching a True/False toggle variable.<br />

Const crlf = Chr$(13) + Chr$(10)<br />

Sub Main()<br />

a = False<br />

b = True<br />

If (Not a and b) Then msg = "a = False, b = True" & crlf<br />

See Also<br />

Platform(s)<br />

toggle% = True<br />

msg = msg & "toggle% is now " & Format(toggle%,"True/False") & crlf<br />

toggle% = Not toggle%<br />

msg = msg & "toggle% is now " & Format(toggle%,"True/False") & crlf<br />

toggle% = Not toggle%<br />

msg = msg & "toggle% is now " & Format(toggle%,"True/False")<br />

MsgBox msg<br />

End Sub<br />

Boolean (data type); Comparison Operators (topic).<br />

Windows and Macintosh.<br />

Nothing (constant)<br />

Description<br />

Example<br />

See Also<br />

Platform(s)<br />

Now (function)<br />

Syntax<br />

Description<br />

A value indicating that an object variable no longer references a valid object.<br />

Sub Main()<br />

Dim a As Object<br />

If a Is Nothing Then<br />

MsgBox "The object variable references no object."<br />

Else<br />

MsgBox "The object variable references: " & a.Value<br />

End If<br />

End Sub<br />

Set (statement); Object (data type).<br />

Windows and Macintosh.<br />

Now[()]<br />

Returns a Date variant representing the current date and time.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!