Previous Page Next Page Contents

textinput -- interactive input of text

Introduction

textinput allows interactive input of text.

Call(s)

textinput( <prompt1>)
textinput( <prompt1,> x1, <prompt2,> x2, ...)

Parameters

prompt1, prompt2... - input prompts: character strings
x1, x2... - identifiers

Returns

the last input, converted to a character string.

Related Functions

finput, fprint, fread, ftextinput, input, print, read, text2expr, write

Details

Example 1

The default prompt is displayed, the input is converted to a character string and returned:

>> textinput()
      Please enter text input: << myinput >>
      
                                 "myinput"

Example 2

A user-defined prompt is used, the input is assigned to the identifier x:

>> textinput("enter your name: ", x)
      enter your name: << Turing >>
      
                                 "Turing"
>> x
                                 "Turing"
>> delete x:

Example 3

If several values are to be read, separate prompts can be defined for each value:

>> textinput("She: ", hername, "He:  ", hisname)
      She: << Bonnie >>
      He:  << Clyde >>
      
                                  "Clyde"
>> hername, hisname
                             "Bonnie", "Clyde"
>> delete hername, hisname:

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000