io.input
Syntax
- a = io.input(s)
Get input from the current input source. The function behaves just as
io.in
, except the input may come from either the console or a data file, which ever one is the current input source. If the input source is a data file, the next line of text from the file is read. The return value depends on the characters input. FISH tries to decode the input first as an integer, and then as a floating-point number. The return value will be of these types if the input is a single number that can be decoded with one of these types. In this case, the number should be the only data entered. If the input characters cannot be interpreted as a single number, the return value will be a string of those characters. The functionstype
andtype.name
can be used to determine the return type.Returns: a - integer, double, or string Arguments: s - string printed prior to input from the current input device
Was this helpful? ... | 3DEC © 2019, Itasca | Updated: Feb 25, 2024 |