Result Commands

Home, Up: Results

 

On this page:

$ and hy, Result Control Codes, Results Commands.

 

$ and hy

To repeat:

After a calculation $ holds the unformatted result, its former value becomes the new value of $$.

The formatted result is also written to the file hy, except in silent mode or within a script before it has ended.

Accumulation mode allows more than one result to be written to the file hy.

Assigning a value to a variable does not update $ or hy, nor does the evaluation of an IF ... THEN condition.

The content of hy can be used in a calculation as an insert file, (hy), or can be read into a user-defined element, @myude = (hy).

 

Result Control Codes

As already discussed on the previous page, these codes can be appended to a calculation line, separated by a space.

... # means silent mode, the result will not be written to hy.

... & means accumulation mode, the result will be added to the current content of hy.

... && also means accumulation mode, the result will be added to the current content of hy, but in a new line.

 

Results Commands

(About buffer mode see the next page, "The Result Buffer".)

= -- show the last result (the value of $) in the currently chosen format (nothing gets changed).

== -- show the last result (the value of $) in decimal format with up to 18 digits (nothing gets changed).

$ -- write the last result (the value of $) to hy in the currently specified format. Not allowed in a script. The previous content of hy gets overwritten. The value of $$ is not changed.

& -- clear the result file hy (hy is not deleted, but will be empty). If buffer mode is ON, clear the buffer. $ and $$ are not changed.

0 -- technically this is not a command but a calculation. $ is set to 0, this also becomes the content of hy, $$ assumes the previous value of $.

&& -- add a line break to the result file hy. If buffer mode is ON, insert a line break in the buffer.

 

HY -- show the content of the result file hy (unless it has more than 40 lines or 4000 characters).

EDIT -- open the result file hy in the chosen external editor (by default notepad.exe).

COPY -- copy the content of the result file hy to the Windows clipboard (previous content of clipboard will be overwritten).

COPYALL ON -- turn copy to clipboard mode on, all results will be copied to the clipboard (each time overwriting the previous content).

COPYALL OFF -- turn copyall mode off.

COPYALL -- show current copyall mode (ON or OFF).

 

Note that HY, EDIT, COPY and COPYALL always refer to the result file hy and do not work with buffer mode (see next page).

 

Home, Up: Results, Prev: HY and Accumulation Mode, Next: The Result Buffer