/
Advance 1: IF - THEN - ELSE Statement (Pascal Expression)
To open any link in a new tab, preserving your position in the current article, just hold down the <CTRL> key on your keyboard before clicking the link or click using your mouse wheel.
Advance 1: IF - THEN - ELSE Statement (Pascal Expression)
IF (condition) THEN (result:= ) ELSE (result:= )
- If (condition): User can use any normal operators or formulas which can be inserted in (condition). When the condition is true, It will give the result.
Tip: The condition can be isolated in parentheses ( ) to organize better (not necessary but good practice)
If ([property]<0)
If ('[property]' = 'Text')
If ([property] + 10)
- Then (result:= ): This is the result of the if statement when the above condition is true. Users can use any normal operators or formulas here.
Caution: The returned value for the result will need to share the same type, being either a text or number, with the "inherited-from" property.
Then (result:=[property])
Then (result:='[property]') (if the property type is a text)
Then (result:=[property]-10) (if property type is a number)
- Else (result:= ): When the (condition) is not true, it cannot give the output in "THEN (result:=)". Instead it returns an alternative result that is Else (result:= ).
Example : If a equals 10 then d will display "It is correct". If a does NOT equal to 10 then d will display "It is NOT correct"
, multiple selections available,
Related content
Basic 1: IF - THEN Statement (Pascal Expression)
Basic 1: IF - THEN Statement (Pascal Expression)
More like this
Advance 2: IF - THEN - ELSE Statements Multiple Condition and Alternative Results (Pascal Expression)
Advance 2: IF - THEN - ELSE Statements Multiple Condition and Alternative Results (Pascal Expression)
More like this
Basic 2: IF - THEN Statement with More Than One Condition (Pascal Expression)
Basic 2: IF - THEN Statement with More Than One Condition (Pascal Expression)
More like this
Pascal Expression Available Operators List (Check Link)
Pascal Expression Available Operators List (Check Link)
More like this
How To: Establish a Property as a Pascal Expression (Difficulty Level: Basic)
How To: Establish a Property as a Pascal Expression (Difficulty Level: Basic)
More like this
Possible errors when writing an IF - THEN Statement
Possible errors when writing an IF - THEN Statement
More like this
Copyright 2023 ConstructConnect