Chapter Contents

Previous

Next
LASTCMD

LASTCMD



Returns the text of the last command that was issued from the application window

Category: Command


Syntax
Details
Example
See Also

Syntax

cmdtext=LASTCMD();

cmdtext
contains the text of the last command that was issued from the application window.

Type: Character


Details

If the command contains multiple words, only the first word is returned.

LASTCMD is usually used in conjunction with CONTROL ENTER, ALWAYS, or ALLCMDS.


Example

Retrieve the last command that was issued in the window and display a message, based on that command name:

INIT:
   control always;
return;
MAIN:
   cmd=lastcmd();
   if cmd='GO' then
      _msg_='Last command was '||cmd;
return;

See Also

WORD


Chapter Contents

Previous

Next

Top of Page

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