Microsoft KB Archive/34334

= CALLing Library Routines with ! Required Only for DEFSTR =

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 &quot;Microsoft QuickBASIC for Apple Macintosh: Language Reference.&quot; 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 &quot;Must invoke DrawText! (! required) in older compiler&quot;

E.10.3.5 Toolbox Programming Errors
The following correction, marked between chevrons (<< >>), applies to Page 524 for the &quot;Type Mismatch&quot; error:

&quot;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, <> or when a variable is of the wrong type.&quot;

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

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.