Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:create:filter-elseif [20.11.2014 12:01] alexander.ritteren:create:filter-elseif [28.11.2014 12:59] (current) alexander.ritter
Line 1: Line 1:
 ======  Conditions with More Than 2 Options ====== ======  Conditions with More Than 2 Options ======
  
-How the questionnaire continues after a filter is often not just limited to two options, but several. For example, people with an analog internet connection or ISDN should be asked about the tariff they use; DSL users about the speed and connection provider. People who have a different connection get questions about the type of cable between the computer and the wall. +How the questionnaire continues after a filter is often not just limited to two options; in fact there are several possibilities as to how it progresses. For example, people with an analog internet connection or ISDN should be asked about the tariff they use; DSL users about the speed and connection provider. People who have a different connection will get questions about the type of cable between the computer and the wall. 
  
-Two different language constructs can be used: ''elseif'' and ''switch'' in such cases. The former is linked to the well-known if-else construct; the latter is explained here more for the sake of completeness. Occasionally, using ''switch'' is more concise if several values of the same variable should be checked. +Two different language constructs can be used in such cases: ''elseif'' and ''switch''. The former is linked to the well-known if-else construct; the latter is explained here more for the sake of completeness. Occasionally, using ''switch'' is more concise if several values of the same variable should be checked. 
  
  
Line 118: Line 118:
     break;             // the last break is not necessary     break;             // the last break is not necessary
 } }
-// further questions+// other questions which all respondents are asked
 question('BB01'); question('BB01');
 </code> </code>
Line 131: Line 131:
   default: html('<p>Invalid Answer</p>');   default: html('<p>Invalid Answer</p>');
 } }
-// further questions+// other questions which all respondents are asked
 question('BB01'); question('BB01');
 </code> </code>
en/create/filter-elseif.txt · Last modified: 28.11.2014 12:59 by alexander.ritter
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki