Individual constants
Quick reference
To refer to one or more codes in a single column, type:
'codes'
More information
An individual constant is one or more of the codes 1234567890–& or blank. The – is sometimes referred to as the 11 or X punch, and & is sometimes called the 12, V or Y punch. Each code represents one answer to a question. For example, take the question ‘What is your favorite color?’ which has the response list:
Red | 1 |
Yellow | 2 |
Blue | 3 |
Green | 4 |
Black | 5 |
White | 6 |
coded into one column. If my favorite color is green, this appears in the data file as a 4 in the appropriate column, just as if your favorite color is red, there is a 1 in that column.
To refer to these answers inside your Quantum program (you might want to include only those respondents whose favorite color is blue), type the code enclosed in single quotes:
'3'
You also have to tell Quantum which column to look in.
To refer to columns, see
Data variables.
Several codes may be combined in the same column and are called multicodes, Suppose the next question asks the responder to choose three colors from the same list, and they choose yellow, black and white. If these answers were all coded in the same column (a multicoded column), you refer to them by typing:
'256'
or
'526'
or
'652'
or any other variation of those three codes. Quantum does not care what order you enter the codes in.
If you have a series of consecutive codes in the order &–01234567890–&, you can either:
▪type each code separately or
▪enter the first and last codes separated by a forward slash (/) meaning ‘through’, as shown below:
'1/7' | means | ’1234567’ |
'&/4' | means | ’&–01234’ |
'&/9' | means | ’&–0123456789’ (all 12 codes) |
'1/&' | means | ’1234567890–&’ (all 12 codes) |
The last two examples mean exactly the same thing. However, '0/&' and '0–&' are not the same: '0/&' means ‘01234567890–&’ whereas '0–&' is '0', '–' and '&@ only.
Some combinations of codes represent ASCII characters; that is, they represent characters which you can type on your screen:
'&1' | is the equivalent of | ’A’ |
'&2' | is the equivalent of | ’B’ |
The only time you use letters rather than codes (that is, ‘A’ rather than ‘&1’) is when the questionnaire tells you that a column should contain a letter.
If you need to write a notation for ‘no codes’ (for example, if the respondent’s favorite color does not appear in the list of choices) write ' ' (that is, a blank enclosed in single quotes).
Note The notation ' ' is a special case, since blank is not really a code. If you type a blank inside single quotes with any other characters Quantum follows its usual rule of ignoring spaces. For example, ' 12 ' is read as '12'.
See also