Merge pull request #226 from philbudne/as7-octal
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;
|
||||
printf "\tfound constant: $value\n" if ($debug);
|
||||
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 {
|
||||
$syllable = $value + 0;
|
||||
|
||||
Reference in New Issue
Block a user