=============
Getting Input
=============

We can get input from the keyboard using 

* The Give Command
* The GetChar() Function
* The Input() Function

.. index:: 
	pair: Getting Input; Give Command

Give Command
============

Syntax:

.. code-block:: none

	Give VariableName

Example:

.. code-block:: none

	See "Enter the first number : " Give nNum1
	See "Enter the second number : " Give nNum2
	See "Sum : " + ( 0 + nNum1 + nNum2 )
 
Output:

.. code-block:: none

	Enter the first number : 3
	Enter the second number : 4
	Sum : 7

GetChar() Function
==================

We can get one character from the standard input using the GetChar() function

Syntax:

.. code-block:: none

	GetChar() ---> Character

Example:

.. code-block:: none

	While True
		See "
			Main Menu
			(1) Say Hello
			(2) Exit
		    " 
		Option = GetChar()
		GetChar() GetChar()  # End of line

		# the previous two lines can be replaced with the next line
		# Give Option

		if Option = 1
			see "Enter your name : " give cName 
			see "Hello " + cName
		else
			bye
		ok
	End

.. index:: 
	pair: Getting Input; Input()

Input() Function
================

We can get input from the keyboard using the Input() function

Syntax:

.. code-block:: none

	Input(nCount) ---> string

The function will wait until nCount characters (at least) are read

Example:

.. code-block:: none

	See "Enter message (30 characters) : " cMsg = input(30)
	See "Message : " + cMsg
