Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Programming Microsoft Dynamics NAV 2013

You're reading from   Programming Microsoft Dynamics NAV 2013 Experienced programmers and developers will find this the definitive guide to programming Microsoft Dynamics NAV. Both a reference book and a comprehensive hands-on tutorial, it will expand your knowledge dynamically.

Arrow left icon
Product type Paperback
Published in Feb 2013
Publisher Packt
ISBN-13 9781849686488
Length 630 pages
Edition 3rd Edition
Arrow right icon
Toc

Table of Contents (19) Chapters Close

Programming Microsoft Dynamics NAV 2013
Credits
Foreword
About the Authors
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
1. An Introduction to NAV 2013 FREE CHAPTER 2. Tables 3. Data Types and Fields 4. Pages – the User's Interactive Interface 5. Queries and Reports 6. Introduction to C/SIDE and C/AL 7. Intermediate C/AL 8. Advanced NAV Development Tools 9. Develop, Debug, Deliver Answers to Review Questions Index

Data conversion and formatting functions


Some data type conversions are handled in the normal process flow by NAV without any particular attention on part of the Developer; for example, Code to Text, Char to Text, and so on. Some data type conversions can only be handled through C/AL functions. Formatting is included because it can also include a data type conversion. Rounding does not perform a data type conversion but does result in a change in format (the number of decimal places). These C/AL functions are:

  • ROUND

  • FORMAT

  • EVALUATE

ROUND

The ROUND function allows us to control the rounding precision for a decimal expression. The syntax for the ROUND function is as follows:

DecimalResult := ROUND (Number [, Precision] [, Direction] )

Here Number is what is being rounded, Precision spells out the number of digits of decimal precision, and Direction indicates whether to round up, round down, or round to the nearest number. The following table shows some examples of Precision values:

Precision value...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime