out expression outp expression
out formatstring ... outp formatstring ...
out
expression - any expression (variable, constant, function, ...). String or numeric.
formatstring - string with format fields (as with str.format function). Must be string enclosed in double quotes.
... - values that will be inserted in formatstring.
out displays text in the QM output. It is useful to debug macro.
outp pastes text. It stores text into the clipboard and presses Ctrl+V.
After outp, QM restores previous clipboard content (text only), unless run-time option opt clip 1 is set.
If expression or formatstring is string constant (text enclosed in double quotes), keyword outp can be omitted.
QM 2.3.0. Supports tags that add colors, links, etc. To display text with tags, the text must begin with "<>".
Mostly used format fields: %i for integers and %s for strings.
See also: escaping special characters, str.setsel, str.getsel, str.getclip, str.setclip
simple text: out "text" 2 lines: out "Line1[]Line2" variable a: int a = 10 out a out a + b ;;sum of variables a and b Call function len and display its return value: lpstr s = "String" out len(s) variable i in decimal and j in hexadecimal: out "%i 0x%X" i j "Copyright © 2002 Macrosoftt Corporation": str c = "Macrosoftt" int y = 2002 out "Copyright %c %i %s Corporation" 169 y c outp "text" ;;paste simple text "text" ;;the same (outp is omited) outp a ;;paste variable a outp "%i[]" a ;;paste variable a and new line