Lesson 2 -- Summary


In summary all macros will have a certain minimum amount of code in them. This basic required portion of code can be represented as:

PROGRAM  macro_name;

  BEGIN
    program statements;
  END macro_name.

The italicized text above will vary from macro to macro. It is important to remember these few rules:

  • The macro name must match after the PROGRAM and END statements.
  • If the code you are working on is a MODULE it will use the MODULE keyword in lieu of the PROGRAM keyword.
  • All macros must have one and ONLY ONE PROGRAM module.
  • During LINKING the PROGRAM module must be specified first. You may COMPILE the modules in any order.
  • Macros can have an unlimited number of MODULES.
  • Both PROGRAMS and MODULES will have the final END keyword followed by a period ('.')
  • A MODULE will not have a BEGIN statement as it will rely on the PROGRAM module of the macro to call the procedures and functions contained within it.

We have covered a large part of the basics of the DCAL language. As .html in the introduction to this lesson, much of the material covered here may not make perfect sense to you at first. Keep this lesson in mind as you progress in the tutorial and refer back as needed.

Since we have not written any new source code in this lesson, it would probably be a good idea to review the sample macros contained in your DCAL/SAMPLES subdirectory or at the end of the DCAL manual. See if you can spot the features we discussed in this lesson.

End of Lesson 2

< Previous   |   Continue >

Table of Contents



Thank you for printing this page. Please feel free to contact us for further assistance. You can call our sales department at +1 (800) 394-2231, Monday through Friday from 8:00 a.m. to 5:00 p.m. Eastern time or send an e-mail message to info@datacad.com.