|
-
Feb 18th, 2001, 10:14 PM
#1
there is no variable, its a Value. Enter More Theory:
Whenever you do a comparison, it will return a boolean
value. This can save lines and lines of coding, if, for
example, you needed to assign "True" or "False" to a
variable. You could do it this way:
Code:
If X > Y Then
Z = True
Else
Z = False
End If
But, a MUCH better way to do it is this:
So, any comparison that you do returns a boolean
variable. This goes for While loops as well. Example:
Code:
Do While X > Y
'Do Some Stuff
Loop
WHen our program hits this block of code, it checks our
statement. If X started off being less than Y, the code
would never execute, because X > Y returns "False".
Basically, all I did in the Do While True loop, is, instead
of passing a statement (X = X, for example) i saved
myself typing time by just passing the value "True".
I hope that sheds some light on this stuff =).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|