Getox Posted September 16, 2005 Posted September 16, 2005 how would i go about making a function? and then how would i use it? Quote Page Edit 2.0 Alpha 2 OUT NOW! - Download Now -
IceAzul Posted September 16, 2005 Posted September 16, 2005 As opposed to a subroutine? Function AddNumbers(a As Integer, b As Integer) As Integer return a + b; End Function Sub Main() Dim Result As Integer = AddNumbers(10, 100) End Sub At least that is what I think you are asking. You have 100 posts, it would be kind of hard to get that far if you meant functions in general. Quote
Getox Posted September 16, 2005 Author Posted September 16, 2005 How would i do something like Function Message(message) Messagebox.show(message,"Wait a sec!") End Function Quote Page Edit 2.0 Alpha 2 OUT NOW! - Download Now -
IceAzul Posted September 16, 2005 Posted September 16, 2005 In VB, a Sub(routine) is just that, a package of code that is run. A Function returns something. So I am not really sure what you want. It looks like you already solved your problem from the post. Quote
Getox Posted September 16, 2005 Author Posted September 16, 2005 Hey, what do you know that code i type worked, Looks like vb.net is a bit like PHP :D Quote Page Edit 2.0 Alpha 2 OUT NOW! - Download Now -
Leaders snarfblam Posted September 16, 2005 Leaders Posted September 16, 2005 (edited) I recommend you look into a VB .Net tutorial. [Edit]I mean to pick up syntax, not to learn how to program.[/edit] Edited September 16, 2005 by snarfblam Quote [sIGPIC]e[/sIGPIC]
bri189a Posted September 16, 2005 Posted September 16, 2005 VB is like most (probably all) programming languages...you can use the variable passed into a function... ditto marble_eater remarks. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.