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.

34 Introduction Chapter 2<br />

Terminology<br />

Abbreviation<br />

dt<br />

col<br />

colname<br />

obj<br />

db<br />

Object<br />

data table<br />

column in a data table<br />

the name of a column in a data table<br />

an object<br />

display box<br />

These variables are not pre-assigned references. Each one must be assigned prior to its use. In the following<br />

example, the global variable named A is assigned the value “Hello, World”. When the Show( A ) command<br />

is processed, the result is the value of A.<br />

A = "Hello, World";<br />

Show( A );<br />

A = "Hello, World";<br />

Arguments and Parameters<br />

An argument is additional information that you can provide to a function or message. For example, in<br />

Root(25), 25 is an argument to the Root() function. Root() acts on the argument that you provide and<br />

returns the result: 5.<br />

Programming and scripting books commonly talk about parameters as well. A parameter is a description of<br />

the argument that a function accepts. For example, the general specification for Root() might be<br />

Root( number ), where number is the parameter.<br />

Parameter and argument express two perspectives of the same concept: information that a function needs.<br />

For simplicity in this book, we use the word argument in both cases.<br />

A named argument is an optional argument that you select from a predetermined set and explicitly define.<br />

For example, title("My Line Graph") in the Graph Box() function is a named argument because the<br />

title is explicitly defined as such.<br />

Graph Box( title("My Line Graph"),<br />

Frame Size( 300, 500 ),<br />

Marker( Marker State( 3 ), [11 44 77], [75 25 50] );<br />

Pen Color( "Blue" );<br />

Line( [10 30 70], [88 22 44] );<br />

Note that the Frame Size() arguments 300 and 500 are not named. The position of these arguments<br />

implies meaning; the first argument is always the width, the second argument is always the height.

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

Saved successfully!

Ooh no, something went wrong!