When the flagFN() function iterates through os.Args,
the first v value is "abs", which causes the flag "s" to be misinterpreted.
diff --git evaluator/functions.go evaluator/functions.go
index 5d3d7c0..52999a7 100644
--- evaluator/functions.go
+++ evaluator/functions.go
@@ -615,7 +615,7 @@ func flagFn(tok token.Token, env *object.Environment, args ...object.Object) obj
// passed to the script
// This is O(n) but again, performance
// is not a big deal in ABS
- for _, v := range os.Args {
+ for _, v := range os.Args[1:] {
// If the flag was found in the previous
// argument...
if found {
When the
flagFN()
function iterates throughos.Args
, the firstv
value is "abs
", which causes the flag "s
" to be misinterpreted.