Chapter Contents |
Previous |
Next |
SAS/C Cross-Platform Compiler and C++ Development System User's Guide, Release 6.50 |
Note: Use of these extensions is likely to render a program nonportable.
Compiler Comment Support |
// This is a comment line
Note: This support is turned off if the
-Kstrict
compiler option is used.
Extended @ Operator Capability |
Compiler support for the at sign (@)
has been extended.
When the compiler option
-KAT
is specified, the at sign (
@
) is treated as a new operator. The
@
operator can be used only in an argument to a function call. (The
result of using it in any other context is undefined.) The
@
operator has the same syntax as
&
. In situations where
&
can be used,
@
has the same meaning as
&
.
In addition,
@
can be used on non-lvalues such as constants and expressions. In
these cases, the value of
@expr
is the address of a temporary storage area to which the value of
expr
is copied.
@operator is when its argument is an array name or a string literal. In this case,
@array
is
different from
&array.
While
@array
addresses a pointer addressing the array,
&array
still addresses the array.
The compiler continues to process the @ operator as
in earlier releases when the @ is in the context of a function call. Use of
@
is nonportable. Its use should
be restricted to programs that call non-C routines using call-by-reference.
Character and String Qualifiers |
Release 6.50 introduces
A
and
E
qualifiers for character
and string constants. The new qualifiers cause the string to be either ASCII
or EBCDIC.
A string
literal prefixed with
A
is parsed and stored by the compiler as an ASCII string. An example of its
usage is:
A"this is an ASCII string"
A string literal prefixed with
E
is parsed and stored by the compiler as an EBCDIC string. An example
of its usage is:
E"this is an EBCDIC string"
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 1998 by SAS Institute Inc., Cary, NC, USA. All rights reserved.