![]() Chapter Contents |
![]() Previous |
![]() Next |
| SAS/C Software: Changes and Enhancements, Release 6.50 |
This section introduces the extensions to the ISO/ANSI C language implemented in Release 6.50 of the SAS/C Compiler. Library extensions are described in SAS/C Library Reference, Volume 1, SAS/C Library Reference, Volume 2, and SAS/C Compiler and Library User's Guide.
Note: Use of these
extensions is likely to render a program nonportable.
The SAS/C Compiler now support C++ style line comments. A line comment starts with two forward slashes and goes to the end of the line. An example of the new comment extension is:
// This is a comment line
Note: This support is turned off if the
strict compiler option is used.
Compiler support for the at sign (@) has been extended. When the compiler option
AT 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.
One special case for the
@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.
Release 6.50 introduces
A and
E qualifiers for character and string constants. The new qualifiers causes 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 © Mon Mar 9 09:11:22 EST 1998 by SAS Institute Inc., Cary, NC, USA. All rights reserved.