Posts

Repetitive Statements or Loop

Repetitive Statements or Loop Repetitive Statements or Loops are using when we want to execute one statement or more than one statement multiple times. In the case of IF loop it will work only for one time execution only. So if the user need to execute a statement more than one times based upon some condition.  All the repetitive statements are works in a manner like that it will work repetedly until one condition satisfy and if that condition appear then it moves the control to next programming satement after the repetitive statements. And in the case of repetitive statements always having initialize variable and increment values will appear.  Some of the Repetitive statements are IF Statement, WHILE .. DO, REPEAT .. UNTIL etc.

CLEAR

CLEAR() In Microsoft Dynamics NAV C/AL CLEAR() is used to clear the Variable. The sysntax of CLEAR()  is  CLEAR(Variable); CLEAR () clears the variable in the manner like if the Variable is Integer then the Variable value reset to zero. And if the variable is String then the Variable value reset to empty. For Exapmple, If you want to reset a Result variable that stores the sum of previous calculation then you have to mension  CLEAR(Result); After executing this line the calue Result goes to zero. So the CLEAR () is most usable function in the good C/AL programing.