mirror of
https://github.com/DoctorWkt/pdp7-unix.git
synced 2026-01-11 23:53:23 +00:00
as7: accept (decimal) digits in octal constants, like as.s does!
This commit is contained in:
parent
6e0f90c5a9
commit
a08d97c8d8
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user