Jump to content

Decision tables: Difference between revisions

m
m (syntax highlighting fixup automation)
m (→‎{{header|Perl}}: use v5.36)
Line 1,664:
 
=={{header|Perl}}==
<syntaxhighlight lang="perl" line>use strictv5.36;
 
use warnings;
sub decide($q,$a) {
my $cnt@q = 1@{$q};
localmy *%a = shift%{$a};
my ($cnt,$bit) = (1,0);
 
sub decide {
our(@q,%a);
local *q = shift;
local *a = shift;
my $bit;
my $cnt = 1;
for my $prompt (@q) {
print "$prompt: ";
Line 1,690 ⟶ 1,688:
'Printer does not print',
);
 
my %answers = (
0b00100000 => 'Check the power cable',
2,392

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.