What is returned?

mabl4367
Member Posts: 143
What is returned by a funktion if the returnvariable has no name and no call to EXIT() is made in the function?
I have a function that returns a boolean with no name. Previously the code included a call to EXIT() that defined whether the value returned sould be true or false. Now that the call to EXIT() has been removed what is returned? Is the returnvalue going ti be always TRUE or always FALSE or maby random?
I have a function that returns a boolean with no name. Previously the code included a call to EXIT() that defined whether the value returned sould be true or false. Now that the call to EXIT() has been removed what is returned? Is the returnvalue going ti be always TRUE or always FALSE or maby random?
0
Answers
-
A random value :-D :-D that would be funny
It gives back the initial value of the datatype. On Boolean it is false.
If the returnvariable has a name like "ReturnBoolVar", an it is set in the function, the exit returns the value of this variable.
If the returnvariable hasn't a name and in the exit() is nothing set, it's returned the initial value.
regardsDo you make it right, it works too!0 -
That was what I suspected but I needed confirmation.
Thank you very much!0 -
You're welcomeDo you make it right, it works too!0
-
I will rather wrote that it will return "UNDEFINED" value. That this value is same as default value of the data type is just coincidence. Do not rely on it.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions