Microsoft KB Archive/35965

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Article ID: 35965

Article Last Modified on 11/21/2006

This article was previously published under Q35965

SUMMARY

Certain versions of Microsoft QuickBasic and Microsoft Basic Compiler can CALL routines from certain other Microsoft languages (and pass parameters), depending upon the product version number (as explained below).

MORE INFORMATION

Microsoft Basic Professional Development System (PDS) version 7.1 can be linked with Microsoft C PDS version 6.0 or QuickC version 2.5 or 2.51.

The following application note, which can be requested from Microsoft Technical Support, is required if you want to perform Basic version 7.1 mixed-language programming with C version 5.1, FORTRAN version 5.0, or Pascal version 4.0:

"How to Link Basic PDS 7.10 with C 5.10, FORTRAN 5.00, or Pascal 4.00" (application note number BB0345)


QuickBasic 4.5 and Basic PDS 7.0 (but not earlier versions) can create .OBJ modules that can be linked with .OBJ modules from Microsoft FORTRAN version 5.0 and Microsoft QuickC versions 2.0 or 2.01.

QuickBasic versions 4.0b and 4.5, Microsoft Basic Compiler versions 6.0 and 6.0b for MS-DOS and MS OS/2, and Microsoft Basic PDS version 7.0 for MS-DOS and MS OS/2 create .OBJ modules that can be linked with .OBJ modules from the following languages:

  1. Microsoft Pascal version 4.0.
  2. Microsoft FORTRAN version 4.1.
  3. Microsoft C version 5.1 and QuickC versions 1.01, 2.0, and 2.01.
  4. Microsoft Macro Assembler (MASM) version 5.0 or later recommended, but earlier versions should also work.

For more information on interlanguage CALLing between Microsoft C and Basic, query in on the word BAS2C.

For more information on interlanguage CALLing between Microsoft MASM and Basic, query on the word BAS2MASM.

For more information about using the CALL statement to pass parameters from Basic to other languages, query on the following words:

CALL and (PASSING or PASS) and (language name)


QuickBasic 4.0

QuickBasic version 4.0 creates .OBJ modules that can be linked with .OBJ modules from the following languages (Microsoft has performed successful interlanguage test suites for QuickBasic version 4.0 with these language versions):

  1. Microsoft C version 5.00, QuickC version 1.0.
  2. Microsoft FORTRAN version 4.0.
  3. Microsoft Pascal version 4.0.
  4. Microsoft Macro Assembler (MASM) versions 4.0 and later recommended, but earlier versions should also work.

Note that QuickBasic version 4.0b might link with these earlier language versions, but Microsoft cannot guarantee success because the 4.0b test suites were performed only on the later language versions mentioned further above in this article.

QuickBasic 1.x, 2.x, 3.0

In QuickBasic versions 1.0, 1.01, 1.02, 2.0, 2.01, and 3.0, you can link only to .OBJ modules from Microsoft Macro Assembler (versions 1.2x, 2.x, or later) or the given version of QuickBasic. In other words, QuickBasic versions 3.0 and earlier can CALL only QuickBasic subprograms or assembly routines.

Important Information About Interlanguage CALLing

To be compatible with compiled Basic, programs should be assembled or compiled using the medium, large, or huge memory model, and Basic must be linked first (as the main module).

When you link compiled Basic to other compiled Basic modules, compiler versions should not be mixed. For example, an .OBJ module compiled in QuickBasic version 4.0 should not be linked with an .OBJ module compiled in QuickBasic version 4.0b or 4.5 or Microsoft Basic Compiler version 6.0 or 6.0b or Microsoft Basic PDS version 7.0 or 7.1.

As an alternative to the CALL statement for interlanguage invocation, you may use the SHELL statement to invoke most (non-TSR) .EXE, .COM, or .BAT programs that you can also invoke from DOS. SHELL works differently than CALL. SHELL invokes another copy of the DOS COMMAND.COM command processor before running a requested executable program.

QuickC Version Numbers

Any compatibility issues for QuickC version 2.5 also apply to version 2.51. Any compatibility issues for QuickC version 2.0 also apply to version 2.01.

Note that "Microsoft QuickC version 2.5" and "Microsoft QuickC with QuickAssembler version 2.51" are two separate products.

Shorthand references to "QuickAssembler" or "QuickC" version 2.51 (or 2.01) actually refer to the official product name "Microsoft QuickC with QuickAssembler version 2.51 (or 2.01)."

The only difference between QuickC 2.5 and 2.51 is the addition of a QuickAssembler, to create and assemble stand-alone assembly programs. The QuickC portion of the 2.51 product is exactly the same as in QuickC 2.5. (Also, the QuickC portion of the 2.01 product is exactly the same as in QuickC 2.0.) Thus, QuickC is optionally available without the QuickAssembler, but the QuickAssembler is only available bundled with the "QuickC with QuickAssembler" product.


Additional query words: QuickBas BasicCom 7.10 6.00 5.10 5.00 3.00 2.50 2.00 1.00

Keywords: KB35965