Chapter Contents

Previous

Next
Command Directory

watch

Assign Expressions to the Watch Window

ABBREVIATION
wa{tch}

FORMATS
Format 1: watch EXPRESSION [%FMT]
Format 2: watch EXPRESSION COUNT

DESCRIPTION
The watch command is used to assign expressions to the Watch window, which is used to track the value of expressions or areas of storage. The window is not automatically opened.

Format 1: This format is used to assign an expression to the Watch window where its value will be displayed in a manner similar to the print command. The EXPRESSION and %FMT arguments are the same as those specified for the print command.

Format 2: This format is used to assign an area of storage to the Watch window where its contents will be displayed in a manner similar to the dump command. As with the dump command, the EXPRESSION argument must specify an address type. The COUNT argument is an integer that specifies the number of bytes to be watched.

EXAMPLES

watch i
assigns the variable i to the Watch window where it is displayed in the default format.

watch i %x
assigns the variable i to the Watch window where it is displayed in hexadecimal format.

watch ptr 6
displays 6 bytes of memory starting at the address pointed to by ptr .

SYSTEM DEPENDENCIES
none

COMMAND CAN BE ISSUED FROM

PROFILE no
configuration file no
Source window prefix none

SCOPE
The watch command uses command scope to resolve references to all identifiers.

RETURN CODES SET
Successful: 0
Unsuccessful: 1

SEE ALSO


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.