Nested if-else Statements in X++: Syntax and Examples
☰Fullscreen
Table of Content:
Syntax
if(bool expression){ if( bool expression) { // Statements } else { // Statements } } else { if( bool expression) { // Statements } else { // Statements } }
if statement Example
// nested if else decision making example x++ static void Examples(Args _args) { int a = 3; int b = 1; if( a == 3 ) { if( b == 1 ) // this is nested if { info("a = 3 and b = 1 "); } } else { info("a != 3 and b != 1 "); } }