Skip to content

Commit 75f9cb0

Browse files
committed
updated doc of flag command
1 parent f814b1c commit 75f9cb0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/src/docs/types/builtin-function.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,30 @@ Type 'quit' when you're done, 'help' if you get lost!
181181
STRING
182182
```
183183
184+
ABS does not (currently) support passing multiple values
185+
for a flag, and will instead select the very first value
186+
it encounters:
187+
188+
```bash
189+
$ abs -f 1 -f 2
190+
Hello user, welcome to the ABS programming language!
191+
Type 'quit' when you're done, 'help' if you get lost!
192+
> flag("f")
193+
1
194+
```
195+
196+
In case you need to support passing a 'list' of arguments
197+
for a flag, we recommend using a comma-separated string,
198+
and doing something like:
199+
200+
```bash
201+
abs -f 1,2
202+
Hello user, welcome to the ABS programming language!
203+
Type 'quit' when you're done, 'help' if you get lost!
204+
> flag("f").split(",")
205+
["1", "2"]
206+
```
207+
184208
### pwd()
185209
186210
Returns the path to the current working directory -- equivalent

0 commit comments

Comments
 (0)