True.htm 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>True</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. None.
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. 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.
  21. <br>
  22. <br>
  23. 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>.
  24. </td>
  25. </tr>
  26. </table>
  27. <h1><a href=../2d_examples/True.bb>Example</a></h1>
  28. <table>
  29. <tr>
  30. <td>
  31. ; TRUE example <br />
  32. <br />
  33. ; Assign test a random number of 0 or 1 <br />
  34. test= Rnd(0,1) <br />
  35. <br />
  36. ; TRUE is implied; This statement REALLY means: if test=1 is TRUE then proceed <br />
  37. If test=1 Then <br />
  38. Print "Test was valued at 1" <br />
  39. End If <br />
  40. <br />
  41. ; Let's set test to be true <br />
  42. test=True <br />
  43. <br />
  44. ; Pointlessly test it <br />
  45. If test=True Then <br />
  46. Print "Test is true" <br />
  47. End If
  48. </td>
  49. </tr>
  50. </table>
  51. <br>
  52. <a target=_top href=../index.htm>Index</a><br>
  53. <br>
  54. 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>
  55. </html>