(WinBatch Console only)
Writes the result of a WIL expression to a WinBatch Console window.
Cout WIL-expression
(s) WIL-expression - a valid WinBatch or WIL expression.
(i) @TRUE on success; @FALSE on failure.
This console command evaluates a WIL scripting language expression and writes the result to WinBatch Console's window. The results of the evaluation must be representable as text. The command displays an error if the result cannot be converted to a will string variable. Most WIL/WinBatch expressions have string representations so almost all expressions can be passed to this command.
Unlike other functions, the Cout command does not require opening and closing parentheses around it its parameter. Although you may need to use them to have the command evaluate a compound expression correctly.
While Cout can accept almost any expression, a full WIL statement cannot be used as the parameter.
Examples of expression types that can be used with Cout:
Examples of statement types that cannot be used with Cout:
Cout can only be used from the WinBatch Console command prompt, a script called or included from the WinBatch Console command prompt, or in a script used as a WinBatch Console startup script. When the command is used outside of WinBatch Console the command does nothing, its parameter is ignored, and it returns @False.
WinBatch Console, Multiline Mode, Console Keyboard Shortcuts, Cin