file/console.bi

Summary
file/console.bi
LicenseCopyright © 2007-2011, FreeBASIC Extended Library Development Group
ext
Enumerations
ConsoleIOUsed by the Console object to determine whether to read or write from the console.
ConsoleClass emulating the basic functionality of C#’s System.Console object.
Functions
Constructor
ReadLineRetreives one full line of input from the console.
WriteOverloaded to print any built-in type to the console without a line break afterwards.
WriteLineOverloaded to print any built-in type to the console followed by a line break.
Properties
LastErrorReturns the integer error code of the last error.

License

Copyright © 2007-2011, FreeBASIC Extended Library Development Group

Distributed under the FreeBASIC Extended Library Group license.  See accompanying file LICENSE.txt or copy at http://code.google.com/p/fb-extended-lib/wiki/License

ext

Summary
Enumerations
ConsoleIOUsed by the Console object to determine whether to read or write from the console.

Enumerations

ConsoleIO

Used by the Console object to determine whether to read or write from the console.

con_stdinopens the console for input
con_stdoutopens the console for output

Console

Class emulating the basic functionality of C#’s System.Console object.

Notes

This object is threadsafe.

Summary
Functions
Constructor
ReadLineRetreives one full line of input from the console.
WriteOverloaded to print any built-in type to the console without a line break afterwards.
WriteLineOverloaded to print any built-in type to the console followed by a line break.
Properties
LastErrorReturns the integer error code of the last error.

Functions

Constructor

Parameters

iothe method to open the console with, defaults to con_stdout

ReadLine

declare function ReadLine( ) as string

Retreives one full line of input from the console.

Write

declare sub Write (byref x as fbext_TypeName(T_))

Overloaded to print any built-in type to the console without a line break afterwards.

WriteLine

declare sub WriteLine (byref x as fbext_TypeName(T_))

Overloaded to print any built-in type to the console followed by a line break.

Properties

LastError

declare property LastError( ) as integer

Returns the integer error code of the last error.

0 indicates no error, -1 is error in usage, >0 is error code from the runtime library

declare function ReadLine( ) as string
Retreives one full line of input from the console.
declare sub Write (byref x as fbext_TypeName(T_))
Overloaded to print any built-in type to the console without a line break afterwards.
declare sub WriteLine (byref x as fbext_TypeName(T_))
Overloaded to print any built-in type to the console followed by a line break.
declare property LastError( ) as integer
Returns the integer error code of the last error.