[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "printf %d ''" should diagnose the empty string
From: |
Martin D Kealey |
Subject: |
Re: "printf %d ''" should diagnose the empty string |
Date: |
Tue, 26 Nov 2024 11:31:05 +1000 |
How about a counter-proposal: when not in POSIX mode, arguments that
correspond to numeric conversions in printf could be subject to normal
arithmetic evaluation, so that « printf %d '6*7' » will output “42”.
(Yes of course they should be subject to the single evaluation limit,
regardless of any shopt to the contrary.)
That would include evaluating an empty *expression* as zero.
-Martin
- Re: "printf %d ''" should diagnose the empty string, (continued)
- Re: "printf %d ''" should diagnose the empty string, #!microsuxx, 2024/11/19
- Re: "printf %d ''" should diagnose the empty string, #!microsuxx, 2024/11/19
- Re: "printf %d ''" should diagnose the empty string, Paul Eggert, 2024/11/19
- Re: "printf %d ''" should diagnose the empty string, Martin D Kealey, 2024/11/20
- Re: "printf %d ''" should diagnose the empty string, Chet Ramey, 2024/11/20
- Re: "printf %d ''" should diagnose the empty string, Paul Eggert, 2024/11/20
- Re: "printf %d ''" should diagnose the empty string, Martin D Kealey, 2024/11/21
- Re: "printf %d ''" should diagnose the empty string, Paul Eggert, 2024/11/21
- Re: "printf %d ''" should diagnose the empty string, Martin D Kealey, 2024/11/22
- Re: "printf %d ''" should diagnose the empty string, Chet Ramey, 2024/11/22
Re: "printf %d ''" should diagnose the empty string,
Martin D Kealey <=