C/AL coding conventions

I have general question: is there any common conventions (perhaps provided by Navision) of C/AL source code formatting? Rules of calling variables, compound statements, etc. I’ve heard that some documentation was in 2.0 version bundle, but I don’t have it here, we’re working with version 3.01. Thanks in advance. PS.Once I was in our NSC’s office, in the room of development team, and I saw such paper there. Recently I asked them about it, they couldn’t find it. Maybe they just didn’t use it?:slight_smile:

Did you check the Developers Manual ? I think there are some guidelines in there.

quote:


Originally posted by gco
Did you check the Developers Manual ? I think there are some guidelines in there.


What Developers Manual do you mean? Application Designer’s guide?

There is also a “C/AL™ Programming Guide” containing some guidelines.

C/AL™ Programming Guide → explains how to code, post, etc. Graphical User Interface Guide → rules when designing forms, reports, etc. Application Designer’s Guide → seems to me to be a summary of the Programming training manual

don’t show him ours! Jan… If you want to show us anything, show your own little “C/AL™ Programming Guide”, as you call it.

quote:


Originally posted by eromein
don’t show him ours! Jan…


Why not? Will it be againts the rules?

quote:


If you want to show us anything, show your own little “C/AL™ Programming Guide”, as you call it.


Is it possible?

When I first moved Australia to Europe, I had a huge problem trying to get everyone to drive on the correct side of the road, (i.e. the Left), so I moved to England where things were normal. When I moved to the US, I discoved the problem again, but this time, instead of having accidents evrey day, and paying huge insurance bills, and never being able to get anywhere, I tried driving on the Right. All of a sudden, everything was simple, no more accidents, and I could easily get off and on the highways, life was great. I soon realized that there is no right or wrong, just a custom, and a standard. Point is that its much easier to follow the standards where you are, than to try (or even expect) to change everyone else. In the Navision world, the standards have been set long ago, and you should follow them, so before you even start, the fist thing you MUST (as in MUST) read is the Terminology Hand Book(w1w1term.pdf). This book makes the assumption that at some in the life of an implementation, another person will be required to read the code, so lets try and follow standards and make it readable. If you want to use variables names like decInvQtyRemAtLoc thats fine, but go back to VB or what ever. I hate the nightmare task of trying to read through pages of unreadable code just because some programmer refuses to follow standards. The next thing, is to look at Navision design and development practices and follow them, don’t come into Navision with an attitude of well I can do it this way in VB, why can’t I do it this way in Navision. Do it the Navision way, and your life will be easy.

I have recently found again a Navision GUI Guide which might be what you are looking for, though it’s a bit old (Last updated: 27/04/01 ). Pass me your e-mail adress and I can send it to you, it’s only 565k. … ok, I just saw David’s post and realize that the Terminology handbook contains the very same information - so you’d better stick to this handbook, it’s on every installation CD [;)] Saludos Nils

Hi Nils, I would be interested in the Old GUI guide, I lost it some time ago (is it the word version you have), that HTML one they had for a couple of years was just horrible to use. Please send to me email below. Thanks.

Today I’ve found the document I was looking for. It’s a “C/AL Programming Guide”, or w1w1cal.pdf in another terms. Thanks to all for your replies.

The C/AL programming guide will NOT teach you conventions, please first read the Terminology Handbook, BEFORE you start developing.

HI, The other material that you should read is Basic Navision Object this material contain step by step to create Navision object and Naming Conventions for the object.And this material it’s mandatory for who want to become a navision solution programing certified.