#### 5.1.1 Defining Variables

Variables come in two basic types, viz: numeric and string. Variables such as age, height and satisfaction are numeric, whereas name is a string variable. String variables are best reserved for commentary data to assist the human observer. However they can also be used for nominal or categorical data.

data-list defines two variables forename and height, and reads data into them by manual input.

         PSPP> data list list /forename (A12) height.
         PSPP> begin data.
         data> Ahmed 188
         data> Bertram 167
         data> Catherine 134.231
         data> David 109.1
         data> end data
         PSPP>

Example 5.1: Manual entry of data using the `DATA LIST` command. Two variables forename and height are defined and subsequently filled with manually entered data.

There are several things to note about this example.

- The words ‘`data list list`’ are an example of the `DATA LIST` command. See DATA LIST. It tells pspp to prepare for reading data. The word ‘`list`’ intentionally appears twice. The first occurrence is part of the `DATA LIST` call, whilst the second tells pspp that the data is to be read as free format data with one record per line.
- The ‘`/`’ character is important. It marks the start of the list of variables which you wish to define.
- The text ‘`forename`’ is the name of the first variable, and ‘`(A12)`’ says that the variable forename is a string variable and that its maximum length is 12 bytes. The second variable's name is specified by the text ‘`height`’. Since no format is given, this variable has the default format. For more information on data formats, see Input and Output Formats.
- Normally, pspp displays the prompt PSPP> whenever it's expecting a command. However, when it's expecting data, the prompt changes to data> so that you know to enter data and not a command.
- At the end of every command there is a terminating ‘`.`’ which tells pspp that the end of a command has been encountered. You should not enter ‘`.`’ when data is expected (ie. when the data> prompt is current) since it is appropriate only for terminating commands.