Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Português - Русский - 日本語
Aide de Scilab >> Entrées/Sorties > input

input

prompt for user input

Syntax

x = input(message [, "string"])

Arguments

message

character string

"string"

the character string "string" (may be abbreviated to "s")

x

real number (or character string if "string" is in the syntax)

Description

input(message) gives the user the prompt in the text string and then waits for input from the keyboard. The input can be expression which is evaluated by evstr. If nothing but a carriage return is entered at the prompt input(message) returns an empty matrix.

Invoked with two arguments, the output is a character string which is the expression entered at keyboard. If nothing but a carriage return is entered at the prompt, input(message) returns an empty string.

Examples

//x=input("How many iterations?")
//x=input("What is your name?","string")

See Also

  • evstr — évaluation d'une expression
  • x_dialog — boîte de dialogue
  • x_mdialog — boîte de dialogue pour la saisie de paramètres
  • isempty — check if a variable is an empty matrix or an empty list

History

VersionDescription
6.0.0

In case where nothing is entered with the string input argument, input returns an empty string instead of a space.

Scilab Enterprises
Copyright (c) 2011-2015 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jun 15 08:31:06 CEST 2016