Skip to content

Commit

Permalink
fix name of variable used for op codegen Exception parameter
Browse files Browse the repository at this point in the history
Also added a note that the parameter is unused because it is not
involved in setting `$badcode` for exceptional cases for each function
as intended (e.g., negative values for `sqrt()` would require complex
numbers to be returned).

This helps move PDL towards using `use strict` everywhere.
  • Loading branch information
zmughal committed Jul 3, 2015
1 parent 2cae17e commit e0fd8a6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Basic/Ops/ops.pd
Expand Up @@ -89,7 +89,9 @@ EOH
# handle exceptions
my $badcode = '$ISBAD(a()) || $ISBAD(b())';
if ( exists $extra{Exception} ) {
delete $exists{Exception};
# NOTE This option is unused ($badcode is not set).
# See also `ufunc()`.
delete $extra{Exception};
}

pp_def($name,
Expand Down Expand Up @@ -232,7 +234,9 @@ sub ufunc {
if ( exists $extra{Exception} ) {
# $badcode .= " || $extra{Exception}";
# print "Warning: ignored exception for $name\n";
delete $exists{Exception};
# NOTE This option is unused ($badcode is commented out above).
# See also `biop()`.
delete $extra{Exception};
}

# do not have to worry about propagation of the badflag when
Expand Down

0 comments on commit e0fd8a6

Please sign in to comment.