Algosim documentation: InputBox

InputBox

Displays a text input box and returns the text entered by the user.

Syntax

Description

InputBox(s, d) displays a text input prompt with caption s and default text d. If the user enters a text, that text is returned. Otherwise, an error is raised, which can optionally be handled by the succeeded or the try function.

Examples

if(
  succeeded(
    name ≔ InputBox("What is your name?")
  ),
  MessageBox("Welcome, " ~ name ~ "!"),
  MessageBox("Welcome anonymous user!")
)

Image 1

Image 2

See also