Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'https://rosettacode.org/wiki/Call_a_function
- Imports System
- Module Program
- Sub Main()
- Hello()
- Console.WriteLine(CopyIt("Hello ", 6))
- Console.WriteLine(CopyIt("Hello ", 3, "!!"))
- End Sub
- Public Function CopyIt(sString As String, siNo As Short, Optional sEnd As String = "") As String
- Dim siCount As Short
- Dim sNewString As String = ""
- For siCount = 1 To siNo
- sNewString &= sString
- Next
- Return Trim(sNewString) & sEnd
- End Function
- Public Sub Hello()
- Console.WriteLine("Hello world!")
- End Sub
- End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement