The Input Command (currently under development)

The input command is used to retrieve keyboard input from the user. This input is receved as a string and stored as a variable you specify.


input(prompt; varname);

Prompt is an optional parameter. If used, it prints a string before asking the user for input. If prompt is omitted, the ';' should also be omitted.


To define a variable named name with a prompt "Enter your name: ", you would use the input statement in the following way:

input("Enter your name: "; name);

The following would be shown, prompting the user for information with _:

Enter your name: _

      List of Data Types
      The ';' Token
      The " Token

Copyright © Computer Sciences Club 2012