Comparing Language Compilers

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

Include

Visual Basic 3.0 file1.bas
form1.frm
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=GLOBCONS; GLOBCONS.BAS
   Module=DOS_CTRL; DOS_CTRL.BAS
   Module=GlobalConstants; ..\..\..\Program Files\Microsoft Visual Studio\VB98\GlobalConstants.bas
   Form=DOS_OPT.FRM
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 - clemenzi@cpcug.org
URL: http:// cpcug.org / user / clemenzi / technical / Languages / Compilers.htm