ooc-dev team mailing list archive
-
ooc-dev team
-
Mailing list archive
-
Message #00248
Array literals? Variable arguments?
A question:
I'm writen a simple parser and I'm going to have a function that reads
characters until it finds a given string.
Something like this:
readUntilString:func~withList(ls:List<String>) -> (String,String)
It reads until it finds any of the strings given in the list and then
returns the read and the string found on stop.
But calling this function is a little ugly since I have to create an
ArrayList and populate it, and I'd like to do something like this instead:
parser readUntilString(">", " ", "//")
Is there any way to have variable arguments in a function? Or is there any
way to write a list or array literal?
Thanks!
Damian.
Follow ups