Home Page

Functions And Keywords Page

Alphabetical Index

Next Topic

Previous Topic

Sample Programs

Updates And Corrections


Undocumented Functions

Yes friends, we have some hidden functions to tell you about. I can't say they're a secret, just overlooked by the Cakewalk Help system in one case and never explained in the CAL reference in all cases.
 
NIL
This keyword is not a function exactly, and it never needs to be in brackets. It's just a placeholder. If you have a CAL function that requires an argument in some part of the expression and you don't want there to be one, you can use "NIL" as a substitute. That usage was illustrated earlier in the overview of the "if" function. This is about the only place I can think of to use it, in that CAL versions 2 and above don't require the "NIL" as part of the code the way earlier versions of CAL did.
 
(exit)
If you look at the code that makes up the NEED20.CAL program that installs with Cakewalk, you will see a function called "exit". You don't see it anywhere else or see mention of it anywhere. You would think the developers of CAL were ashamed of it or something. It can be very useful as demonstrated in NEED20.CAL. When CAL hits this keyword, the program aborts and all CAL activity ends. This can be very useful if you want to auto-exit after testing true for some fatal condition such as there being no events in range that qualify for whatever you were going to do to them. The result of calling (exit) is the presentation of a dialog box stating that the "Program called (exit)" and the halting of CAL.
 
(error)
I'm not too sure what this function is for, but as best as I can gather, you can set up a testing function and have one of the results call this function to warn of some error condition you've set the trap for. Perhaps this was only for the benefit of the developers of CAL and it just got left in. It seems to do exactly the same thing as the (exit) function except the acknowledgement dialog box it generates says, "Program called (error)" instead of the message for "exit". CAL halts just the same.
 
Next Topic Top Of Page