Decision tables: Difference between revisions

Content added Content deleted
(→‎{{header|REXX}}: added/changed whitespace and comments, elided deadcode, added highlighting to the output, added a template for the output section.)
m (→‎{{header|REXX}}: simplified some code.)
Line 1,761: Line 1,761:
Q.2 = 'Is there a red light flashing on the printer?'
Q.2 = 'Is there a red light flashing on the printer?'
Q.3 = 'Is the printer unrecognized by the software?'
Q.3 = 'Is the printer unrecognized by the software?'
Q.0 = 3 /*the number of questions to be asked. */
action.= /* Y=yes N=no if character isn't a letter = don't care.*/
action.= /* Y=yes N=no if character isn't a letter = don't care.*/


Line 1,775: Line 1,776:


do i=1 while Q.i\==''; ans.i= asker(i) /*display the question, obtain response*/
do i=1 while Q.i\==''; ans.i= asker(i) /*display the question, obtain response*/
end /*i*/
end /*i*/; Q.0= i - 1 /*adjust Q.0 for the DO loop indexing. */
say /*display a blank line before questions*/
say /*display a blank line before questions*/
possible= 0 /*we'll be counting possible solutions.*/
possible= 0 /*we'll be counting possible solutions.*/