C Escape Sequence Like "\n" Doesn't Function When Passed to C (42857)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft Basic Professional Development System for MS-DOS 7.0
This article was previously published under Q42857 SUMMARY
When CALLing a C function from QuickBasic and passing a C-format
string that contains C escape sequences, the escape sequence does not
execute, but rather displays as part of the string. When the following
example is used, the C "\n" escape sequence for carriage
return/linefeed will not be executed from the C function as expected;
the "\n" will simply be displayed as part of the string:
FORMAT$ = "number1= %d number2= %d\n" + CHR$(0)
CALL CROUTINE(SADD(FORMAT$),LEN(FORMAT$)
This information applies to QuickBasic Versions 4.00, 4.00b, and 4.50,
to Microsoft Basic Compiler Versions 6.00 and 6.00b, and to Microsoft
Basic PDS Version 7.00.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB42857 |
---|
|