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






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);
				

Modification Type: Minor Last Reviewed: 1/9/2003
Keywords: kbbug KB58036