As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.
Here are some tips for How to share your SAS knowledge with your professional network.
%SYSEVALF macro function
From sasCommunity
- This is a work in progress. You can contribute to this article.
The %SYSEVALF macro function evaluates an arithmetic or logical expression using floating point arithmetic.
Syntax
- %SYSEVALF( expression )
or
- %SYSEVALF( expression , conversion )
- expression should be an arithmetic or logical expression that can contain integers or floating point numbers.
- conversion is one of the following keywords indicating how the evaluated result should be converted to an integer.
- BOOLEAN returns 0 if the result is zero or a missing value, otherwise 1 is returned for any other result.
- CEIL returns the smallest integer greater than the result.
- FLOOR returns the largest integer less than the result.
- INTEGER returns the result truncated to an integer.
Usage
To evaluate expressions only containing integers using integer arithmetic you can use the %EVAL macro function.
See also
SAS Support Reference Documentation
SAS Macro Language: Reference: %SYSEVALF Function 9.2, 9.3, 9.4