From 15b87ea17d96856d3ed9f2dbfbc80343b01b78df Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 20 Mar 2026 21:55:57 +0200 Subject: cmd/perc/main.go: try RPN parsing before percentage calculation in command mode - Bare expressions like '1 2 +' now work without 'calc' prefix - Assignment format 'name value =' requires 'calc' subcommand prefix --- README.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 157165d..cb7d9a5 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,10 @@ perc calc x 5 = x x + # x + x = 10 perc calc pi 3.14159 = pi 2 * # 2 * π # → 6.28318 + +# Note: Variable assignment only works with calc/rpn subcommand: +# perc calc x 5 = x x + (works) +# perc x 5 = (won't work in bare mode - use "perc calc x 5 =") ``` #### Variable Management -- cgit v1.2.3