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.