Sub Main()
Console.WriteLine("건강하세요")
Console.WriteLine()
'Dim ReturnString As String
'ReturnString = ReturnVal("나는 누구?")
Dim ReturnString As String = ReturnVal("나는 누구?")
System.Console.WriteLine(ReturnString)
Console.WriteLine()
Console.WriteLine("반갑습니다")
End Sub
Private Function ReturnVal(ByVal CallString As String) As String 'Public
' 함수 프로시저 (매개변수 활용)
'Dim ReturnName As String
'ReturnName = CallString & vbCrLf & "c.y.Kwon"
Dim ReturnName As String = CallString & vbCrLf & "c.y.Kwon"
Return ReturnName
End Function
'=======================================================================================
'========================================================================================
Sub Main()
Dim i갑 As String = "1234567890"
Dim b을 As Boolean = False 'False 로 바꾸어서 실행해 보삼~~~
Dim i병 As Integer = 7
StartWidget(i갑, b을, i병)
End Sub
Private Sub StartWidget(ByVal aWidget As String,
ByVal clockwise As Boolean,
ByRef revolution As Integer) '일반 프로시저(매개변수 활용)
'............................................Public...으로 고쳐서... Test!!
Dim counter As Integer
If clockwise = True Then
For counter = 0 To revolution
System.Console.WriteLine(aWidget.Chars(counter))
Next
Else
For counter = revolution To 0 Step -1
System.Console.WriteLine(aWidget.Chars(counter))
Next
End If
End Sub
'========================================================================