· Jul 14, 2016 2m read

NewBie's Corner Session 13 .MAC and .INT Routines and Comment Lines

NewBie's Corner Session 13 .MAC and .INT Routines and Comment Lines

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

.MAC and .INT versions of Routine

Save Routines with a .MAC Extension

When saving your routines, be sure to specify a .MAC file extension (the default) and not a .INT extension.  The .INT version of a routine is an intermediate version of the routine. It is in the .INT version of a routine that the SQL Code (and other code) from the .MAC version is expanded upon.  I know the VA (Veterans Administration) routinely uses .INT extensions and they get away with it because they know how to do it. But I strongly suggest any NewBie use a .MAC file extension, which is the default.

I know others may disagree with me, well their entitled.

Comment Lines

The best-written code is seldom self-evident as to its intended purpose. Therefore, clearly stated, concise comments are necessary.

One would think that comment lines are straight forward, and they are, well, not always.

I will not go into all the ins and outs of comments (see the InterSystems documentation), but for this post say, anything that follows a semi-colon is a comment (and the semi-colon is not in column 1).

For example

PROC     ; comments may follow a label
               ; Everything that follows the ";" is a comment
               Set X=1                                              ; comments may follow code


--Mike Kadow

If you have a comment, please respond through the InterSystems Developer Community, don't send me private email, unless of course you wish to address me only.

See NewBie Index for an index of all NewBie Corner posts.

Discussion (0)0
Log in or sign up to continue