String+Variables

Strings vs Integers
In the previous program you learned how a variable could be used to work out a game score. The variable used in that program (score) was of type **Integer** which means that whatever information is stored in the variable has to be a whole number.

But what if we need our variable to hold text or characters?

To do this, we need a variable of type **String**.

Specification
A program should ask the user to enter their first name and their last name.

It should store their first name and last name in a variable, and display this variable in a dialog window.

**STEP 1: Designing the screen layout**
Start a new Real Basic file, and lay it out as shown below. Note the names of the 2 edit fields **ForenameField** and **SurnameField**.



STEP 2: Writing the code
Double click on the Message button and carefully enter the code exactly as it is shown below.



Questions
1. What is the name of the variable used in this program?

2. What type of variable has been used in this program?

3. What output did you get from your program?

4. What does the command msgbox do?