The CATALOG command creates a Verb Definition item in the Master Dictionary of the user’s account by creating a direct pointer to the object code. By using CATALOG, a program can be executed directly through TCL, without using the RUN command. Once cataloged, the program can be recompiled without having to be recataloged.
Format
CATALOG filename progname-list |
Parameter(s)
filename |
Name of the mvBASIC program file. |
progname-list |
List of the item-IDs of the programs to be cataloged. An asterisk (*) specifies all programs in the file. |
For example, to catalog the program ADDNUMS in the file BP, use the following command:
>CATALOG BP ADDNUMS [244] 'ADDNUMS' CATALOGED!
> |
The program can then be accessed as if it were a command:
>ADDNUMS ENTER ONE NUMBER?3 ENTER ANOTHER NUMBER?4 THE SUM OF 3 AND 4 IS 7
> |
The program may fail to be cataloged because the object code cannot be found or because there already exists an item in the Master Dictionary with the same name.
The DECATALOG command deletes the Verb Definition item from the user’s account.
Format
DECATALOG filename progname-list |
Parameter(s)
filename |
Name of the mvBASIC program file. |
progname-list |
List of the item-IDs of the programs to be decataloged. An asterisk (*) specifies all programs in the file. |
Example
>DECATALOG BP ADDNUMS [242] ’ADDNUMS’ DECATALOGED.
> |
The DECATALOG command not only deletes the Verb Definition item, it also deletes the pointer to the object code in the file dictionary. The program must be recompiled after it has been decataloged, before it can be executed again with RUN.
See Also