Microsoft KB Archive/45173

= QuickBASIC AllocTempDesc Gets Descriptor of Last String Used =

Article ID: 45173

Article Last Modified on 11/21/2006



This article was previously published under Q45173



SUMMARY
This article describes the AllocTempDesc library support routine, which can be used in interlanguage calling in QuickBASIC 1.00 for the Macintosh.

AllocTempDesc is a routine that allocates a temporary BASIC string descriptor. The descriptor obtained is the temporary string descriptor for the last string that was assigned a value. For example, if a variable A$ is the last string assigned a value before AllocTempDesc is called, then this is the variable that the temporary string descriptor is allocated for. Temporary descriptors are used by other routines in the support library such as AssignString. AllocTempDesc is documented on Page 458 in the &quot;Microsoft QuickBASIC for Apple Macintosh: Language Reference&quot; manual.



MORE INFORMATION
Library support routines are needed to do interlanguage calling from QuickBASIC to Assembly, PASCAL, or C language routines. From assembly language routines, library support routines are accessed by using an offset from a jump table pointed to by register A5. Pure-code-resource routines, such as those created in Lightspeed C, must link with the library support routine files provided on the distribution disks in order to use these support routines. More information on library support routines can be found on Pages 457-467 in the &quot;Microsoft QuickBASIC for Apple Macintosh: Language Reference&quot; manual. The assembly language code for these routines is provided on the QuickBASIC 1.00 distribution Examples disk in the User Libraries folder.

Code Example
A sample program, AddString.C, uses AllocTempDesc to add two strings into a third string. This program can be found on the QuickBASIC 1.00 Examples disk under the folder path &quot;User Libraries:MBPC Rsrcs:LSC PCR:&quot;, where you will find the files &quot;AddString.C&quot; and &quot;AddStrings Proj&quot;. You can load this program's source file into the QuickBASIC 1.00 editor, but you must have Lightspeed C to compile it into a Pure Code resource.

Additional query words: MQuickB

Keywords: KB45173

-

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

© Microsoft Corporation. All rights reserved.