Visual Programming w/ Visual Basic How to minimize risk emanating from the executioner
Function and Sub Review Void function and Value returning function Function in VB is value returning Sub in VB is Void function Terms to keep in mind: Parameter Return Value
How to create function in VB Function [Function_name] ( ByVal [F_Name] As [Type]) As [Type] Return … End Function Everything just the same in C/C++
How to create Sub Sub [Sub_name] () End Sub Do everything needed like in Void function in C/C++
Notice “ByVal” ? Like C/C++, ByVal means ByValue and ByRef is ByReference You just need to change ByVal into ByRef if you want to use reference by address Mostly used in Swapping , etc.
Array To determine array just use “ ( ) “, not “ [ ] “ anymore Dim Arr(3,3) As Integer , etc. To recycle array just use ReDim ReDim Arr(3,2) As Integer , etc. The same, starts from 0
That’s all Keep practice Never draw in your classroom even the executioner demands it. Never. Ever Don’t lose hope. Even it is just a size of earwax Never be alone in Lab session, unless you’re sure you’re God Best advice: don’t ever retake this subject even you got C. Unless you got D or E
http://msdn.microsoft.com/en-us/library/6xxtk8kx.aspx Function and other things for VB or any Microsoft-based technology can be found in msdn Thank you