SADD Function Will Not Accept Concatenated or Quoted Strings (40189)



The information in this article applies to:

  • Microsoft QuickBASIC 4.0
  • Microsoft QuickBASIC 4.0b
  • Microsoft QuickBASIC 4.5
  • Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0

This article was previously published under Q40189

SUMMARY

The SADD (String ADDress) function will not accept a concatenation of strings or a quoted literal string as a parameter. The only valid argument for the SADD function is a single, variable-length string variable.

This information applies to Microsoft QuickBasic Versions 4.00, 4.00b, and 4.50, Microsoft Basic Compiler Versions 6.00 and 6.00b, and Microsoft Basic PDS Version 7.00 for MS-DOS and MS OS/2.

MORE INFORMATION

Under versions of QuickBasic earlier than Version 4.00, the SADD function accepts an argument that is a quoted literal string or a concatenation of strings. This behavior returns the address of the temporary storage location for the string. This is no longer allowed in QuickBasic Version 4.00 or later.

The following is a code example:
c$ = "This program compiles and runs"
b$ = " under Microsoft QuickBasic 3.00"
PRINT c$ + b$
PRINT SADD(c$ + b$)
				

Modification Type:MinorLast Reviewed:1/8/2003
Keywords:KB40189