Created
April 13, 2017 07:04
-
-
Save yyq123/ff3e8bc64a9bcf9f3745602da5a9aba9 to your computer and use it in GitHub Desktop.
FunctionPrintSum.vim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function PrintSum(num1, num2,...) | |
| let sum = a:num1 + a:num2 | |
| let argnum = 1 | |
| while argnum <= a:0 | |
| let sum += a:{argnum} | |
| let argnum+=1 | |
| endwhile | |
| echo "the sum is " sum | |
| return sum | |
| endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment