Modified CALL INT86OLD Program (31776)






This article was previously published under Q31776

SUMMARY

A correction should be made to Page 88 of the following manuals:

  1. "Microsoft QuickBasic 4.00: Basic Language Reference"
  2. "Microsoft Basic Compiler Version 6.00 for MS-DOS and OS/2: Basic Language Reference"
In the CALL INT86OLD sample program on Page 88, the following line is incorrect:
   INARY%(DX) = SADD("MYFILE.TXT" + CHR$(0))
				
The line should be changed to the following:
   temp$ = "MYFILE.TXT" + CHR$(0)
   INARY%(DX) = SADD(temp$)
				
In QuickBasic Versions 4.00 and later, and in Microsoft Basic Compiler Version 6.00, the SADD function only ACCEPTs a string variable as an argument, not a string expression.

MORE INFORMATION

If you try to run the CALL INT86OLD sample program in the QB.EXE Version 4.00 editor, the "Expected: variable" error message appears unless you change the program as shown above.

In QuickBasic Version 3.00, the SADD function can take a string expression as its argument. In QuickBasic Versions 4.00 and greater, the SADD function only can take a string variable (i.e. a simple string variable, or a single element of a string array).

The example on Page 88 is a revised version of a program on Page 149 of the QuickBasic Version 3.00 manual.

Modification Type: Minor Last Reviewed: 1/8/2003
Keywords: KB31776