Nested if else in X++ Programming Language

Rumman Ansari   Software Engineer   2023-10-25   7104 Share
☰ Table of Contents

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 ");
	  }

}