Tuesday, February 27, 2018

Tutorial 5 Conditional Statement in Dot Net

1. IF Statement

This is the most common operator for NAV developers and we use it with BEGIN END statement for every multiple line conditions. So its very common in Dot Net also.


It is very common for all programming language.

2. ELSE IF Statement

If we use, only if statement then all the conditions will be followed either they are true or not. So for program structure we must use this example.


Note : What is the difference between && and & operator?

&& operator does not check all conditions and if first condition is true then code block will excute.

For E.g.
IF (A && B && C) THEN
{
   Code block execution
}

If A is TRUE then code block will execute 

IF (A & B & C) THEN
{
    Code block execution
}
For this code execution all A B C conditions needs to be completed.
Same is true for || and | OR Operator.

3. SWITCH - CASE Operator

This operation is similar to NAV Switch Case. FOR Example :



No comments:

Post a Comment