49 lines
1.2 KiB
HTML
49 lines
1.2 KiB
HTML
<html>
|
|
<head>
|
|
<title>Blitz3D Docs</title>
|
|
<link rel=stylesheet href=../css/commands.css type=text/css>
|
|
</head>
|
|
<body>
|
|
<h1>And</h1>
|
|
<h1>Parameters</h1>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
None.
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h1>Description</h1>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
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.
|
|
<br>
|
|
<br>
|
|
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>.
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h1><a href=../2d_examples/And.bb>Example</a></h1>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
; AND example
|
|
<br />
|
|
|
|
<br />
|
|
name$=Input$("Enter your name:")
|
|
<br />
|
|
pw$=Input$("Password:")
|
|
<br />
|
|
|
|
<br />
|
|
if name$="Shane" and pw$="bluedog" then
|
|
<br />
|
|
print "Access granted! Welcome!"
|
|
<br />
|
|
else
|
|
<br />
|
|
print "Your name or password was not recognized"
|
|
<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=And&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
|
|
</html>
|