And.htm 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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>And</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. AND is a logical operator for doing conditional checks of multiple values and/or expressions. Use this to ensure that two or more conditions are true, usually in an IF ... THEN conditional. See example and see OR, NOT, and XOR.
  21. <br>
  22. <br>
  23. See also: <a class=small href=Or.htm>Or</a>, <a class=small href=Not.htm>Not</a>, <a class=small href=Xor.htm>Xor</a>.
  24. </td>
  25. </tr>
  26. </table>
  27. <h1><a href=../2d_examples/And.bb>Example</a></h1>
  28. <table>
  29. <tr>
  30. <td>
  31. ; AND example <br />
  32. <br />
  33. name$=Input$("Enter your name:") <br />
  34. pw$=Input$("Password:") <br />
  35. <br />
  36. if name$="Shane" and pw$="bluedog" then <br />
  37. print "Access granted! Welcome!" <br />
  38. else <br />
  39. print "Your name or password was not recognized" <br />
  40. end if
  41. </td>
  42. </tr>
  43. </table>
  44. <br>
  45. <a target=_top href=../index.htm>Index</a><br>
  46. <br>
  47. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=And&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  48. </html>