What is DCAL?
DCAL is an acronym for DataCAD Applications Language. DCAL is a block structured programming language. It is based on Pascal and is very similar to Pascal in it's syntax. If you are familiar with languages such as Turbo Pascal or Delphi then you should feel right at home with DCAL. If you have no formal programming knowledge we will endeavor to take you from the basics to more advanced topics.
DCAL is also a modular programming language. What this means is that you can create separate blocks of code (called modules) and compile them separately. These modules can be used by different programs. This is one of many powerful features of DCAL that you should learn and take advantage of. For example, lets say you create a piece of DCAL code that draws a circle on the screen in a macro to draw a door symbol. If this piece of code is in it's own module, it can also be shared with another macro that uses this circle for a completely unrelated purpose. This is the preferred method to do this sort of sharing, but as you will learn, any procedure that you create can be shared.
Because of this modular approach, DCAL requires both compilation AND linking of the different modules to produce the final macro. This will be explained further in the next sections.
This is what DCAL is in theory. In actuality, DCAL is the DCAL compiler (DCC1.EXE and DCC2.EXE), the DCAL linker (DCL.EXE) and various help files and sample code listings all of which reside in your DCAL subdirectory. If you did not install DCAL or have since deleted it from your drive you can install it from your original CD-ROM.
DCAL has many hooks into low-level procedures of DataCAD itself. A DCAL macro can appear as an extension of DataCAD or it can take control of the DataCAD interface and use it in new and different ways. The possibilities are only limited by your skills and imagination.
Remember in the introduction when we .html that programming is both
an art and a science? While it would be an impressive display of 'science'
to rewrite the entire menu structure of DataCAD so that it looks new
(and possibly confusing) to the user it would be rather poor 'art' to
do this. Knowing where to balance what you can do against what you should
do is a skill that will only come with experience. For now, use common
sense and if there is already a standard method of doing something in
DataCAD, avoid writing a macro that does this same task differently.