Desktop User Guides > Professional > Interview scripting > Interview scripting: Getting started > Writing an integer question
 
Writing an integer question
An integer question requires a whole number response; that is, a number without decimals. The Interview Scripting Language calls this a long question.
This example shows how to write a question that looks like this when you run the interview:
This graphic is described in the surrounding text.
Procedure
1 Enter the question name followed by a space, and then the question text enclosed in double quotation marks:
Metadata(en-us, Question, label)
  SurveyTitle "Tea Survey" info;
  Email "Please enter your email address?" text [10..50];
  HowMany "How many cups of tea do you drink in an average week?"
  End Metadata
2 Add the long keyword to specify that this question requires a whole number as its response.
Metadata(en-us, Question, label)
  SurveyTitle "Tea Survey" info;
  Email "Please enter your email address?" text [10..50];
  HowMany "How many cups of tea do you drink in an average week?" long
End Metadata
3 Assume that some respondents do not drink tea at all, and that no respondent can drink more than 99 cups of tea in a week. Type the allowed response range enclosed in square brackets. End the question with a semicolon.
Metadata(en-us, Question, label)
  SurveyTitle "Tea Survey" info;
  Email "Please enter your email address?" text [10..50];
  HowMany "How many cups of tea do you drink in an average week?" long [0..99];
End Metadata
Requirements
UNICOM Intelligence Professional with Interview Scripting.
Next
Writing a decimal question
See also
Interview scripting: Getting started