Open CymDeveloppement opened 1 week ago
I think that the [0]
doesn't work on expressions as of right now. You'd have to assign it to a variable first. This is something that has to be improved soon. Thanks for the issue! I'll add a warning in the docs so that people can see this
for a more comprehensive code, i created a function and it works great.
fun array_value(array, index) {
return array[index]
}
main {
let splitText = array_value(split("foo bar", " "), 0)
command_exist(splitText)
command_exist(array_value(split("foobar", " "), 0))
}
Thank you for creating this issue @CymDeveloppement
Hi, we have many project of bash script, and i think amber is very cool
when i use the function directly as array, i have a parser error : But i seem is incorrect.
Parser :
and if i store function result in variable :
thx