Advertisement
takeda_nemuru

Gambas3: ... args

Aug 30th, 2014
3,383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GAMBAS 0.33 KB | None | 0 0
  1. ' Gambas module file
  2.  
  3. Private Function getSum(...) As Float
  4.    
  5.     Dim yukiParam As Float
  6.     Dim yukiSum As Float
  7.    
  8.     For Each yukiParam In Param.All
  9.         yukiSum += yukiParam
  10.     Next
  11.    
  12.     Return yukiSum
  13.    
  14. End
  15.  
  16. Public Sub Main()
  17.    
  18.     Debug getSum(1, 2, 3, 4, 5)
  19.     Debug getSum(1.2, 3.14)
  20.    
  21. End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement