Boolean or Conditional Operators
Boolean type operators are perhaps the most common operator type in programming. The most basic Boolean operator can shown as:
IF bTest = 1 THEN bTest = 0
The above example will check to see if the Boolean "bTest" equals 1 and if it does will set the Boolean bTest to equal 0.
If you wish to execute more than one line of code when your Boolean condition is met make use of the ENDIF command as so:
IF bTest = 1 THEN
`Do some code here
`And here
`And here as well
ENDIF
You can also make use of the NOT, and the AND commands to add additional conditions to your Boolean expression.
Mathematical Operators
DarkBasic Pro has built in recognition for basic math functions which are:
- for subtraction.
+ for addition.
/ for division.
* for multiplication.
^ for powers.
Examples are:
8 + 8 = 16
X + B = X added to B
The same would apply to subtraction("-"), multiplication("*"), and division("/").
You can also use powers as a simplification of multiplication. For example, a simple way of 4*4*4, would be 4^3.
Relational or Another Type of Condition Operator
These relational operators are not as commonly used as the others operators discussed this article. However, game creators might find relational operators useful in certain cases and situations. Relational operators consist of Less Than or Equal To, Less Than, Greater Than, Greater or Equal To, Not Equal To and Equal To.
Less Than or Equal To is expressed as "" symbol.
Greater Than or Equal To is expressed as ">=".
Not Equal To can be expressed like "".
Equal To is expressed simply with "=" symbol.
Published by James Cloud
I like to program and do basically anything that has to do with technology and computers. View profile
- Accounting Continuing Professional EducationAccounting continuing professional education (CPE) requirements are mandated by individual state boards of accountancy. CPAs...are required to obtain an average...40 hours...one of the highest hourly requirements acro...
The Disgraceful State of Professional SportsDo we really need Professional Sports? This article explores why it's even necessary to ask such a question.
How to Give Your Home Business a Professional ImageWhile there are a lot of home businesses today, there are still a lot of people that are skeptical about these businesses. This is because these people do not think that a home...
Tutorial: How to Sabotage YourselfThis tutorial is designed specifically for self-loathers. Follow the instructions in this guide carefully to become extremely unhappy, poor, disrespected, lonely, and better yet...
Photoshop Tutorial : How to Apply a Weather Effect to Your Text ?This tutorial will show you how to add a Weather effect to your text , weather snow or any thing you want to add a look like a natural effect .
- State of Georgia Threatens to Body Slam Pro Wrestling
- Premiere Pro Series 36" Gas Range Review
- The Pro-Choice Argument
- How to Do Lens and Perspective Correction in Paint Shop Pro
- Photoshop Tutorial: Changing the Color Tone of Your Photos
- How to Dress Like a Professional Working Man
- The Oral B Professional Care 9400 Triumph is a Triumph



