Navigation
Main Page
Random Page
Create a new Page
All Pages
Categories
Administration
File Management
Login/Logout
Language Selection
Your Profile
Create Account
Quick Search
Advanced Search »
Back
History
if structure
'''if'''('condition','true','false') - Returns 'true'-statement if logical 'condition'-statement is true (non-zero), 'false'-statement otherwise. '''ADVICE: Choose it from the Programming palette''' The "if" programming tool returns a value depending on Boolean 'condition'. Boolean condition can be formed by using Boolean palette. Here is a simple example, returning '''numeric''' or '''symbolic''' result. [imageauto|using if|{UP}if/if1.png] The user should take care when defining a function which uses "if". The Boolean condition could be sometimes quite "tricky". For example, if we want to find out if the y-value is inside (x,z) range we could do something like this. [imageauto|value inside the interval - wrong!|{UP}if/if2.png] It is advisable to see the tooltip and the order (precedence) of operators. The operators are usually calculated from left to right. Use ( ) - parenthesis if you have some doubts. [imageauto|value inside interval - good!|{UP}if/if3.png]
ScrewTurn Wiki
version 2.0.37. Some of the icons created by
FamFamFam
.