|
|
Re: Can I use "varargs" with proc? [message #1441074 is a reply to message #1440962] |
Thu, 09 October 2014 08:17 |
Francis BACQUET Messages: 46 Registered: September 2014 |
Member |
|
|
Alright, I will use lists.
A sample code with few lists:
proc demo [val numberList][val textList] [val symbolList] [val display true]{
if [$display | eq true] {
$numberList | each [val text] {show-alert [concat "number " $text]}
$textList | each [val text] {show-alert [concat "text " $text]}
$symbolList | each [val text] {show-alert [concat "symbol " $text]}
}
}
//do nothing
demo [list 1 2 3 4 5] [list one two three four five] [list "*" "=" "%" "-" "+"] false
//display every list with different message
demo [list 1 2 3 4 5] [list one two three four five] [list "*" "=" "%" "-" "+"]
thanks for your answer.
[Updated on: Thu, 09 October 2014 08:19] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02814 seconds