as7: accept (decimal) digits in octal constants, like as.s does!
This commit is contained in:
@@ -514,7 +514,11 @@ sub parse_expression {
|
|||||||
my $value = $1;
|
my $value = $1;
|
||||||
printf "\tfound constant: $value\n" if ($debug);
|
printf "\tfound constant: $value\n" if ($debug);
|
||||||
if ( $value =~ m{^0} ) {
|
if ( $value =~ m{^0} ) {
|
||||||
$syllable = oct($value);
|
# PLB 2020-10-05: behave like as.s
|
||||||
|
$syllable = 0;
|
||||||
|
for my $digit (split(//, $value)) {
|
||||||
|
$syllable = $syllable * 010 + ord($digit) - ord('0');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$syllable = $value + 0;
|
$syllable = $value + 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user