Skip to main content
Version: 23.3

One Essential Command

The single most fundamental command in SenseTalk is put, which displays the value of an expression. A closely-related variant, the put … into command, is used to store a value into a variable or other container.

Put Command

Behavior: The Put command displays a value. If more than one expression is given, separated by commas, the value of each expression is displayed on a separate line.

Syntax:
put { expr1{ , expr2 … } }
put { qty } [  -  |  =  |  +  |  ~  |  <  |  >  |  .  |  /  |  :  |  ?  |  ^  |  &  |  ** * **  |  |  ]

Examples:

put  // this will display a single blank line

put “hello world” // this will display the text “hello world” on a single line

put “hello”, “world” // this will display the text on two lines, with “hello” on one line and “world” on the following line

put 3+5 // this displays “8”, the value of the expression 3+5

A simple variation on the basic put command displays a line of symbols, which is convenient for separating different parts of the output.

Examples:

put -  // this will display a line of 33 “-“ characters
put ? // this will display a line of 33 “?“ characters
put 66 - // this will display a line of 66 “-“ characters

Related: