Comparing Language Compilers

Compiler features
Option Explicit - requires that all variables must be explicitly defined before they are used.
Space underscore enter - line continuation
Backslash enter - line continuation (Needed for macros only)


Visual Basic 3.0 file1.bas
Unlike the other languages, these lines go in the *.mak file, one line per included file. A full path may be included. Additional lines in *.mak specify various parameters.
Visual Basic 6.0 Module=ini_code; ini_code.bas 
Module=name; filename
These lines go in the .vbp (visualBasic Project) file. You can add modules (.bas files) by right clicking in the module list and selecting Add / Module. However, using the design environment, there is no way to determine which directory an included module is in.
C++ #include <source.h>
#include "source.h"
#pragma hdrstop
Find this in the include directory
Find this in the current directory
Marks the end of pre-compiled header files
Delphi Uses ref1, ref2; Each ref points to multiple files, including a header file, a compiled library file, and a design-time executable

Visual Basic 6.0 is simply a mess. The following is from a VB 6.0 .vbp file translated from a VB 3.0 .mak file.

   Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX
   Object={648A5603-2C6E-101B-82B6-000000000014}#1.1#0; MSCOMM32.OCX
   Object={C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0; MSMASK32.OCX
   Object={27395F88-0C0C-101B-A3C9-08002B2F49FB}#1.1#0; PICCLP32.OCX
   Form=..\..\..\Program Files\Microsoft Visual Studio\VB98\dos_reg.frm
   Module=GlobalConstants; ..\..\..\Program Files\Microsoft Visual Studio\VB98\GlobalConstants.bas
This is similar to what is in .vbp files in VB 6.0 only projects. Notice the excessive use of ..\.. where a simple backslash would have made more sense. As a result, your source code is highly non-portable.
Author: Robert Clemenzi -
URL: http:// / user / clemenzi / technical / Languages / Compilers.htm