|
System.Console object
Prototype for System.Console objects SyntaxA 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. Parametersnone. Property OfSystem object. Implemented InECMerge 2.1.78 DescriptionThis object let you read from standard input and write text to standard output and error streams. Properties
Methodsbeep ExamplesExample 1.The following code reads all the lines of input text in SJIS encoding and dumps it as UTF-8 to standard output: var line; See AlsoMethod beepSyntaxfunction beep ( ) Parametersnone Method OfSystem.Console object. Implemented InECMerge 2.2.111 DescriptionEmits 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. ExamplesExample 1.Makes a beep:
Method readlineSyntaxfunction readline (keep_end_of_line) Parameterskeep_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. Method OfSystem.Console object. Implemented InECMerge 2.1.78 DescriptionReads 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. ExamplesExample 1.This example reads the first line of text in the input stream, without line terminator. var first_line = System.Console.readline(); See Also
Methods write and write_errorSyntaxfunction write (text [, text [...]]) Parameterstext. 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 Method OfSystem.Console object Implemented InECMerge 2.1.78 DescriptionWrites 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. ExamplesExample 1.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) See Also
|
|||||||||