Files
BlitzNext/_release/help/commands/2d_commands/True.htm
T
2014-12-08 12:43:20 +13:00

56 lines
1.4 KiB
HTML

<html>
<head>
<title>Blitz3D Docs</title>
<link rel=stylesheet href=../css/commands.css type=text/css>
</head>
<body>
<h1>True</h1>
<h1>Parameters</h1>
<table>
<tr>
<td>
None.
</td>
</tr>
</table>
<h1>Description</h1>
<table>
<tr>
<td>
TRUE is a keyword to denote a positive result in a conditional statement. Often times, TRUE is implied and doesn't need to be directly referenced. TRUE can also be used as a RETURN value from aFUNCTION. See the example.
<br>
<br>
See also: <a class=small href=False.htm>False</a>, <a class=small href=If.htm>If</a>, <a class=small href=Select.htm>Select</a>, <a class=small href=While.htm>While</a>, <a class=small href=Repeat.htm>Repeat</a>.
</td>
</tr>
</table>
<h1><a href=../2d_examples/True.bb>Example</a></h1>
<table>
<tr>
<td>
; TRUE example
<br />
<br />
; Assign test a random number of 0 or 1
<br />
test= Rnd(0,1)
<br />
<br />
; TRUE is implied; This statement REALLY means: if test=1 is TRUE then proceed
<br />
If test=1 Then
<br />
Print "Test was valued at 1"
<br />
End If
<br />
<br />
; Let's set test to be true
<br />
test=True
<br />
<br />
; Pointlessly test it
<br />
If test=True Then
<br />
Print "Test is true"
<br />
End If
</td>
</tr>
</table>
<br>
<a target=_top href=../index.htm>Index</a><br>
<br>
Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=True&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
</html>