Script Prompt Statement

=>

:

=> [host-command] [\!] [\> _var] (primary prompt statement)

: [STN-reply] [\!] [\> _var] (STN secondary prompt statement)

The => and : statements, also known as prompt statements, are shortcuts for a WAIT/SEND combination. The => command waits for a primary or level 1 prompt, "=>" on STN. The : command waits for a secondary or level 2 prompt, ":" on STN. After the prompt is received, host-command or STN-reply is sent to the online host. For example:

=> del history     
: y                
 

is equivalent to:

SEND ""            \* Cause an arrow prompt.

WAIT
  FOR "=>"         \* Wait for the arrow prompt

SEND "del history" \* and send a delete command.
WAIT
  FOR ":"          \* Wait for the confirmation question
SEND "y"           \* and reply.

In each case in the example, STN Express waits to receive a command prompt from STN. After receiving the arrow prompt, STN Express sends a delete history command and then waits for a secondary prompt from STN. STN responds with "DELETE ALL L# ITEMS? (Y)/N:", which STN Express recognizes as a level 2 prompt

The => statement works for STN and online hosts. The : statement is for STN only.

Use the \! operator if you want to edit the host command before it is sent (see also the EDIT statement).

Use the \> operator to assign the L-number result of the command to a variable. For example, suppose the search command in the following statement produces L2 and 1492 answers:  

=> s acid cow \> _lnum

The value of _lnum will be "L2". Furthermore, the # operator can be used with _lnum to retrieve the number of answers in an L-number. The statement:

ECHO "_lnum contains #_lnum answers."

displays:  

L2 contains 1492 answers.

Copyright © 2017 American Chemical Society. All Rights Reserved.