BYTE Function
Returns one character in the ASCII collating sequence.
| Categories: | Character |
| CAS | |
| Restriction: | This function is assigned an I18N Level 0 status, and is designed for SBCS data. Do not use this function to process DBCS or MBCS data. For more information, see Internationalization Compatibility. |
Table of Contents
Syntax
BYTE (n)
Required Argument
n
specifies an integer that represents a specific ASCII character.
| Range | 0–255 |
Details
Length of Returned Variable
In a DATA step, if the
BYTE function returns a value to a variable that has not previously
been assigned a length, then that variable is assigned a length of
1.
ASCII Collating Sequences
For ASCII collating sequences,
the characters that correspond to values between 0 and 127 represent
the standard character set. Other ASCII characters that correspond
to values between 128 and 255 are available on certain ASCII operating
environments, but the information those characters represent varies
with the operating environment.
Example
The following SAS statements
produce these results:
|
SAS Statement
|
Result
|
|---|---|
|
ASCII
| |
----+----1----+----2 | |
x=byte(80); put x; |
P |
See Also
Copyright © SAS Institute Inc. All Rights Reserved.
Last updated: March 16, 2017