27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

DEFINE—!ENDDEFINE 451<br />

!DEFAULT Default argument. After !DEFAULT, specify the value you want to use as a<br />

default for that argument. A default can be specified for each argument.<br />

Example<br />

DEFINE macdef (arg1 = !DEFAULT (V1) !TOKENS(1)<br />

/arg2 = !TOKENS(1)<br />

/arg3 = !TOKENS(1))<br />

frequencies variables = !arg1 !arg2 !arg3.<br />

!ENDDEFINE.<br />

macdef arg2=V2 arg3=V3.<br />

• V1 is defined as the default value for argument arg1. Since arg1 is not specified on the<br />

macro call, it is set to V1.<br />

• If !DEFAULT (V1) were not specified, the value of arg1 would be set to a null string.<br />

Controlling Expansion<br />

!NOEXPAND indicates that an argument should not be expanded when the macro is called.<br />

!NOEXPAND Do not expand the specified argument. !NOEXPAND applies to a single argument<br />

and is useful only when a macro calls another macro (imbedded macros).<br />

Macro Directives<br />

!ONEXPAND and !OFFEXPAND determine whether macro expansion is on or off. !ONEXPAND<br />

activates macro expansion and !OFFEXPAND stops macro expansion. All symbols between<br />

!OFFEXPAND and !ONEXPAND in the macro definition will not be expanded when the macro<br />

is called.<br />

!ONEXPAND Turn macro expansion on.<br />

!OFFEXPAND Turn macro expansion off. !OFFEXPAND is effective only when SET<br />

MEXPAND is ON (the default).<br />

Macro Expansion in Comments<br />

When macro expansion is on, a macro is expanded when its name is specified in a comment<br />

line beginning with *. To use a macro name in a comment, specify the comment within slashes<br />

and asterisks (/*...*/) to avoid unwanted macro expansion. (See COMMENT.)<br />

String Manipulation Functions<br />

String manipulation functions process one or more character strings and produce either a new<br />

character string or a character representation of a numeric result.<br />

• The result of any string manipulation function is treated as a character string.

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

Saved successfully!

Ooh no, something went wrong!