GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Two — Language Overview (continued)
Overview
The ConsoleGetLine function attempts to retrieve a string of data from the default or specified console as terminated by a return or break.
Syntax/Parameters
Syntax
string = ConsoleGetLine ( [string escape] );
Parameters
escape
An optional string specifying characters that will stop the processing. the default is “\r”.
Return Value
A string containing the returned data keyed into the console or empty on failure. Use the GetLastError function to retrieve a formatted error code. If Escape or Ctrl+C is pressed, the error will be returned as ERROR_CANCEL with the code in the return string.
Remarks
This function only operates on the console version of Legato Basic on the default console window. For other versions, ERROR_FUNCTION_NOT_SUPPORTED will be returned.
Input is retrieved from stdin or the standard input which by default is the keyboard.
Characters are collected and echoed to the console. The control character 0x08, Backspace, is processed backing up in the buffer and erasing the previous character in the console window. If an escape string is not provided, keyboard input is collected until a return, Enter, or escape/break is detected.
Escape and break set 0x1B or 0x03 in the first character of the return string. The return character is not added to the return string. Any other specified characters are added as the last character of the string.
The Enter key will also reposition the console to the start of the next line on the screen.
The maximum size of the return buffer is 1MB. In an overflow condition, characters are simply not added to the buffer.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.