params
having a parameter params
means unlimited argument e.gtestBlock(1)
testBlock("a string")
tesBlock([1,2],"desperado","inverse",45,87,97,new Directory("../"), [9,3,3])
block testBlock(params)
@leghtOf(params)
testBlock("Hello", "World", 40)
block testBlock(params)
@params[0] #Hello
@params[1] #World
@params[2] #40
...
will take more scanning time as it will be added to keyword.
...
and give you guyz feedback
Hello guyz. Implementing the ...
i hit a wall the ...
is only usable in language that has type specifier e.g String str = ""
but in simple lang it str = ""
so the ...
is not possible e.g in a block we have
block test(p1,p2,p3)
Using ...
as variadic parameter
test(1,2,4,5)
block test(p1,p2,...)
@...[0] #a big lang breaking error
or we go with C Style that will just bring a foreign identifier to fix that
test(1,2,4,5)
block test(p1,p2,...)
@var_args[0]
Using the ...
is only acceptable for strongly types language e.g java
public void functionOne(String... strings)
System.out.println(strings[0])