Internet Basic documentation

From CometWiki

Jump to: navigation, search
Creating Internet Basic Source Programs

Internet Basic source programs are created in one of two ways. One way is to use UltraEdit to create a source program. The other method is to use the Comet Editor (CED) program from within Comet (see

When you create a source progrom using UltraEdit, you are creating a text file. If you follow the recommended naming convention, your program will inherit the syntax coloring for Internet Basic. That

   Internet Basic source programs contain an extension of .IBS
   Internet Basic include files (aka usefiles) contain an extension of .INC 

Here are some sample source program names:

SAMPLE1.IBS
SAMPLE2.IBS
SAMPLE3.IBS
SAMPLE4.IBS

Source programs created using UltraEdit may contain up to 132 characters per source line. Characters beyond that limit are ignored by the Internet Basic compiler. Compiler command line The Internet Basic compiler recognizes a compiler command in the source program itself. This command is written as a comment and placed on the first line of the source program. The compiler recognizes the following formats:

Comet filenames and directory names

! //IB// Src(<sourcefile>,<sourcedir>) Obj(<objectfile>,<objectdir>) Opt(<options>)

where:

<sourcefile> is a source program name in Comet format. If not specified then the open source file will be compiled.

Note: If the source file is not registered in the Comet QDIR file, it will be registered by the UltraEdit/Comet interface program. <sourcedir> is an existing and accessed Comet directory. If not specified, the DABs will be searched for the first occurence of the filename.

<objectfile> is an existing Comet file. If not specified and the source file contains the .IBS extension, then the source file without the extension will be used for the object filename.

<objectdir> is an existing and accessed Comet directory. If not specified, the the source directory will be used.

<options> is any combination of the following characters:

B - For Comet16 - byte align program data (Comet32 compilations are always byte aligned)
D - For Comet16 - Generate .dbg file for debugger
L - Generate .lst listing file

For example:

! //IB// Src(SAMPLE1.IBS,DSK) Obj(SAMPLE1,MSC)

Notice that the source program named SAMPLE1.IBS is located on directory DSK, and that the object program named SAMPLE1 (no extension) will be located on directory MSC. No compiler options are including in this example.

Windows filenames

! //IB// WSrc(<sourcefile>) WObj(<objectfile>) Opt(<options>)

where:

<sourcefile> is a fully qualified Windows path to a source file. If not specified then the open source file will be compiled.

Note: If the source file is not registered in the Comet QDIR file, it will be registered by the UltraEdit/Comet interface program.

<objectfile> is a fully qualified Windows path to an object file. If not specified and the source file contains the .IBS extension, then the source file without the extension will be used for the object filename.

<options> is any combination of the following characters:

B - Byte align program data

The following commands lines produce the same result:

! //IB// WSrc(G:\Comet\DSK\ClearLst.Ibs) WObj(G:\Comet\DSK\ClearLst)

! //IB// WSrc(G:\Comet\DSK\ClearLst.Ibs)

Notes

The filenames forms (WSrc/Src, WObj/Obj) may be combined in a command line. The compiler command must be placed entirely on a single line. Multiple command lines can be used to facilitate batch compiles. Compiler commands can coexist with the legacy MTB command block. If no source file is specified and the command file extension is "IBS", then the compiler will compile the command file using the same name as the command file (sans extension) for the object file name.

Personal tools