Microsoft KB Archive/58036

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.
Knowledge Base


BUG: QuickBasic's AddStrings.C Incorrect for MPW C Vers 3.00

Article ID: 58036

Article Last Modified on 11/21/2006

This article was previously published under Q58036

SYMPTOMS

The program AddStrings.C, supplied with Microsoft QuickBasic 1.00 for the Macintosh for interfacing with Macintosh Programmer's Workshop (MPW) C, does not work correctly when compiled with MPW C Version 3.00.

When called, AddStrings is supposed to concatenate two strings together and return the result in a third string. As supplied, however, AddStrings does not modify the third string. In the sample program TestPCR.MPWC, the third string is blank after the call (it remains unchanged).

Microsoft has confirmed this to be a bug in QuickBasic Version 1.00 for the Macintosh . We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

To correct AddStrings.C, two lines at the bottom of the routine must be switched. At the very bottom of AddStrings.C are the following three lines:

   resdesc = GetStringArg();
   AllocTempDesc(&tempdesc);
   AssignString(tempdesc,resdesc);
                

These lines should be changed to the following:

   AllocTempDesc(&tempdesc);
   resdesc = GetStringArg();
   AssignString(tempdesc,resdesc);
                


Additional query words: MQuickB

Keywords: kbbug KB58036