| Product | Release |
|---|---|
| SAS/AF | 9.2 |
| 9.1.3 | |
| 9.1.2 | |
| 9.1 | |
| 9.0 | |
| SAS/FSP | 9.2 |
| 9.1.3 | |
| 9.1.2 | |
| 9.1 | |
| 9.0 |
| Previous Page | | | Next Page |
| SCL Arrays |
If you want to use an array in an SCL program but do not need to refer to array elements by name, then you can add the _TEMPORARY_ argument to your ARRAY statement:
array total[4] _temporary_;
When you use the _TEMPORARY_ argument, you must use subscripting to refer to the array elements. For example, you must use TOTAL[2] to refer to the second element in the array TOTAL, defined above. You cannot use the variable name TOTAL2 as an alternative reference for the array element TOTAL[2]. Using the _TEMPORARY_ argument conserves memory. By default, SCL allocates memory for both the name of the array and the names of the individual array elements. However, when you use the _TEMPORARY_ argument, SCL allocates memory only for the array name. For large arrays, this can result in significant memory savings.
Note: Do not use the _TEMPORARY_ option
if you plan to use the SET routine to read values from a SAS table directly
into array elements. You must use the GETVARN or GETVARC function to read
values from a SAS table into the elements of a temporary array. ![[cautionend]](../../../../common/61925/HTML/default/images/cautend.gif)
| Previous Page | | | Next Page | | | Top of Page |
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.
