Microsoft KB Archive/34334

From BetaArchive Wiki

Article ID: 34334

Article Last Modified on 11/21/2006

This article was previously published under Q34334

SUMMARY

The following addition and modification applies to Appendix E of the "Microsoft QuickBASIC for Apple Macintosh: Language Reference." This article expands upon the information presented in the README file for QuickBASIC Version 1.00.

E.2.2 Calling Library Routines

(Add this to Page 420.)

You need to append a type specification (%, &, !, or #) to a library routine name only if a DEFSTR statement affects the first letter of that name. When using DEFINT, DEFLNG, DEFSNG, or DEFDBL, an explicit type character is not required in the routine name when calling a library routine. [In contrast, the earlier Microsoft BASIC Compiler 1.00 for the Apple Macintosh requires an exclamation point on the routine name if DEFINT, DEFDBL, or DEFSTR affects the first letter. An exclamation point (!) declares a single-precision type.]

The following example is accepted in QuickBASIC but not in the older BASIC compiler Version 1.00 for Apple Macintosh:

   DEFINT a-z
   DrawText "Must invoke DrawText! (! required) in older compiler"
                

E.10.3.5 Toolbox Programming Errors

The following correction, marked between chevrons (<< >>), applies to Page 524 for the "Type Mismatch" error:

"This error is generated when you use a variable in a library statement that has not been previously defined, when not enough variables follow the routine name, <<when a library statement name is incorrectly defined as a string type with the DEFSTR statement,>> or when a variable is of the wrong type."

In other words, a library routine name is allowed to have a type of short or long integer, or single or double precision.


Additional query words: MQuickB

Keywords: KB34334