Prototype for System.Console objects
A System.Console global object is created for you and only this object can exist in the application. It is named System.Console and is globally accessible, you can also access its properties directly.
none.
System object.
ECMerge 2.1.78
This object let you read from standard input and write text to standard output and error streams.
Property | Description |
error_encoding | Encoding string. Encoding in which text is converted before being written to error stream. |
input_encoding | Encoding string. Encoding from which text is converted when read from input stream. |
output_encoding | Encoding string. Encoding in which text is converted before being written to output stream. |
beep
readline
write / write_error
The following code reads all the lines of input text in SJIS encoding and dumps it as UTF-8 to standard output:
var line;
System.Console.intput_encoding="SJIS";
System.Console.output_encoding="UTF-8";
while (line = System.Console.readline(true))
System.Console.write(line);
function beep ( )
no return value
none
System.Console object.
ECMerge 2.2.111
Emits the standard "ding" of your system. Note that on Windows, if you instructed the system to not emit the default system sound (Silent mode), nothing is emitted.
Makes a beep:
System.Console.beep()
function readline (keep_end_of_line)
returns a String
keep_end_of_line. Boolean. Defaults to false. If true, the end of line marker is kept. Note that when reading lines which may be empty, it is the only way to know that you reached the end of input stream.
System.Console object.
ECMerge 2.1.78
Reads a line of text from standard input and returns it to the caller. The input text is interpreted as specified by System.Console.input_encoding, it is then transformed to Unicode text internally.
This example reads the first line of text in the input stream, without line terminator.
var first_line = System.Console.readline();
input_encoding property.
function write (text [, text [...]])
function write_error (text [, text [...]])
no return values
text. String. Text to be written to output or error stream. You can put several text per call which avoids the performance hit due to unnecessary concatenation before writing to a stream
System.Console object
ECMerge 2.1.78
Writes text to standard output or error streams. Text is converted into output_encoding or error_encoding encodings respectively, then the obtained binary representation is written to the respective standard stream.
This sample writes number from 1 to 10 to standard output, each followed by a DOS line terminator:
for (var i=1; i<=10; ++i)
System.Console.write (i, "\r\n");
output_encoding property, error_encoding property.