Desktop User Guides > Professional > Interview scripting > Interview scripting: Getting started > Writing a decimal question
 
Writing a decimal question
A decimal question requires a response that contains a decimal point and at least one decimal place. The Interview Scripting Language calls these double questions.
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 a name for the question followed by the question text in double quotation marks:
Metadata(en-us, Question, label)
  SurveyTitle "Tea Survey" info;
  Email "What is your email address?" text [10..50];
  HowMany "How many cups of tea do you drink in an average week?" long [0..99];
  HowMuch "How much do you usually pay when you buy a cup of tea?"
End Metadata
2 Add the double keyword to specify that this is a double question, and follow this with the range of acceptable response values (0 to 9) enclosed in square brackets. End the question with a semicolon.
Metadata(en-us, Question, label)
  SurveyTitle "Tea Survey" info;
  Name "What is your name?" text [2..40];
  HowMany "How many cups of tea do you drink in an average week?" long [0..99];
  HowMuch "How much do you usually pay when buy a cup of tea?" double [0..9];
End Metadata
3 Press F5 to run your interview. You can enter numbers with up to two decimal places. To set the number of decimal places to use when writing out data, see Questions with decimal responses.
Requirements
UNICOM Intelligence Professional with Interview Scripting.
See also
Interview scripting: Getting started