User Tools

Site Tools


fb_controls

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
fb_controls [2022/12/03 23:27] – [Putting it all together] praetorfb_controls [2022/12/03 23:38] praetor
Line 85: Line 85:
 </code> </code>
  
-But what if you want it to match it exactly? This requires **regular experssions** which matches a string against a format. Regular expressions are out of the scope of this beginner's tutorial, but there are plenty of resources you can turn to.+But what if you want it to match it exactly? This requires **regular expressions** which matches a string against a format. Regular expressions are out of the scope of this beginner's tutorial, but there are plenty of resources you can turn to.
  
-What if you have many things you wish to test? Well you can do that with the //elseif// statement, like so:+What if you have many things you wish to test? Well you can do that with the **elseif** statement, like so:
  
 <code freebasic> <code freebasic>
Line 99: Line 99:
 </code> </code>
  
-You can have as many **elseif** statements as you wish, and while you don't necessarily need an **else* statement, it is considered good form to have one to catch any unknowns a user may have. You'll see why when we discuss functions and subroutines.+You can have as many **elseif** statements as you wish, and while you don't necessarily need an **else** statement, it is considered good form to have one to catch any unknowns a user may have. You'll see why when we discuss functions and subroutines. 
 + 
 +We can also use bitwise operators like **AND**, or **OR** to test multiple things as well. Like such. 
 + 
 +<code freebasic> 
 +if Ucase(myname) = "PRAETOR" or "SMJ" then 
 +   print "I know you!" 
 +... 
 +</code> 
 + 
 +**OR** states that if myName is either PRAETOR or SMJ, then the condition is true.  
fb_controls.txt · Last modified: 2022/12/04 01:27 by praetor