14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

296 Data Tables Chapter 9<br />

Row State Operators<br />

Table 9.4 Operators for converting between numbers and row states (Continued)<br />

Numbers<br />

Convert from<br />

numbers to<br />

row states<br />

Row states<br />

Convert from<br />

row states to<br />

numbers<br />

Numbers<br />

–2 to 2<br />

(dark to light)<br />

Shade State(n)<br />

Shade<br />

Excluding, Hiding, Labeling, and Selecting<br />

This section discusses the Boolean states: conditions that are either on or off. The next section looks at the<br />

Color, Marker, Hue, and Shade states: conditions that have many choices.<br />

Excluded gets or sets an excluded index, which is 1 or 0 (true or false) indicating whether each row is<br />

excluded. Similarly, Hidden gets or sets a hidden index, which is 1 for hidden or 0 for not hidden; Labeled<br />

gets or sets a labeled index, which is 1 for labeled or 0 for not labeled; and Selected gets or sets a selected<br />

index, which is 1 for selected or 0 for not selected. For example:<br />

Excluded(Row State()); // returns 1 if current row is excluded, 0 if not<br />

Hidden();<br />

// returns 1 if current row is hidden, 0 if not<br />

Labeled(Row State()); // returns 1 if current row is labeled, 0 if not<br />

Selected();<br />

// returns 1 if current row is selected, 0 if not<br />

Excluded(Row State())=1; // excludes current row<br />

Hidden()=0;<br />

// unhides current row<br />

Labeled(Row State())=1; // labels current row<br />

Selected()=0;<br />

// deselects current row<br />

Recall that these functions assume the argument Row State() if none is given.<br />

Excluded State, Hidden State, Labeled State, and Selected State do the reverse. That is, they<br />

get or set a row state condition as true or false according to the argument. Nonzero values set the row state<br />

to true, and zero values set it to false. Missing values result in no change of state.<br />

rowstate()=excluded state(1); // changes current row state to excluded<br />

rowstate()=hidden state(0); // changes current row state to not hidden<br />

rowstate()=labeled state(1); // changes current row state to labeled<br />

rowstate()=selected state(0); // changes current row state to not selected

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!