Search This Blog
Microsoft Dynamics Technical Topics
- Arrays
- Built In Functions
- C/AL Editor
- C/AL Language
- C/SIDE
- C/SIDE Tutorial
- CASE
- CLEAR()
- Combound Statements
- Comments
- Data Types
- EXIT Statement
- Expressions
- FOR Loop
- Form Design
- Function Parameters
- Functions
- IF THEN ELSE
- Loops
- MESSAGE Function
- Operators
- REPEAT - UNTIL Loop
- Repetitive Statements
- Self Practise Topics
- Triggers
- Variables
- Welcome Message
- WHILE .. DO Loop
- WITH Loop
Recent Visiters
LOCAL FUNCTIONS AND VARIABLES
FUNCTION PARAMETERS
FUNCTION PARAMETERS IN MICROSOFT DYNAMICS
Function parameter is one or more variables or expressions that are sent to the function through a function call. These parameters provided for function information also can able to modify that information. If there is more than one parameter, the parameters will be sepearated by commas.
There are mainly 2 types of parameter passing occur
- Pass By Value
- Pass By Reference
- Pass By Value:- In this type of parameter passing only pass some values only. If we change thse values then it will not affect in the parent trigger or values. That is once pass the value it will not affect any kind of changes in the parent method, its only passing the value.
- Pass By Reference:- In this kind of parameters its pass like reference of the variable, sometimes called name of the variable. Whenever we change the value of these variables it will affect the parent trigger also. Because in this type the computer knows the exact storage space of that variable or parameter.
FUNCTIONS IN MICROSOFT DYNAMICS
FUNCTIONS IN MICROSOFT DYNAMICS
Definition
Functions are named portions of a program, some times called as Subprogram or Subroutine.
When a function is called from a set of programming code then current programming code is suspended and continued with a trigger code. And after the completion of that trigger the program control return to the origin.
A function can be used as expression also
For example:
TotalCost := Qty * CalculatePrice
In this code CalculatePrice is one function that calculate the price and after the calculation it return some value based upon that further programming codes executes.
Built In Functions
In Microsoft Dynamics C/SIDE programming using some built in functions also. These programming codes cannot be viewed by the users and it cannot be modified.
Some of the built in functions are as follows
- MESSAGE :- Displays a message on the screen.
- MAXSTRLEN :- Return defined legth of string variable.
- COPYSTR :- Returns part of a string
- CLEAR :- Clears the passed in variable
- ARRAYLEN :- Returns number of elements in an array.
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.
Facebook Page
Followers
Blog Archive
About Me
- Jubel
- He is a Software Engineer with more than 10 years of Industry Experience. He started posting on blog content from year 2009. He was the initial editor for the Train Help . He is frequent traveler and enthusiastic to learn all new technologies.