14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

174 Data Structures Chapter 7<br />

Associative Arrays<br />

New Column( "name",<br />

character,<br />

setvalues( nms[J( 100000, 1, Random Integer( N Items( nms ) ) )] )<br />

)<br />

);<br />

Wait( 0 );<br />

t1 = Tick Seconds();<br />

Write(<br />

"\!N# names from BigBigClass = ",<br />

N Items( Associative Array( dtbig:name ) ),<br />

", elpased time=",<br />

Tick Seconds() - t1<br />

);<br />

Sort a Column’s Values in Lexicographic Order<br />

Because keys are ordered lexicographically, putting the values into an associative array also sorts them. For<br />

example, the

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

Saved successfully!

Ooh no, something went wrong!