September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
16
Task/Variadic-function/BaCon/variadic-function.bacon
Normal file
16
Task/Variadic-function/BaCon/variadic-function.bacon
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
' Variadic functions
|
||||
OPTION BASE 1
|
||||
SUB demo (VAR arg$ SIZE argc)
|
||||
LOCAL x
|
||||
PRINT "Amount of incoming arguments: ", argc
|
||||
FOR x = 1 TO argc
|
||||
PRINT arg$[x]
|
||||
NEXT
|
||||
END SUB
|
||||
|
||||
' No argument
|
||||
demo(0)
|
||||
' One argument
|
||||
demo("abc")
|
||||
' Three arguments
|
||||
demo("123", "456", "789")
|
||||
Loading…
Add table
Add a link
Reference in a new issue