3 Replies - 446 Views - Last Post: 24 January 2014 - 03:29 PM Rate Topic: -----

#1 meeop  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 10-January 14

What does one call this?

Posted 23 January 2014 - 07:21 PM

Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

ResetGame()
DrawRemainingPellets()
DrawCharacters()
UpdateStatsBar()

Me.Show()

DrawScreen()
Main()

End Sub

Public Sub Main()

What does one call this type of parentheses thing? Using something with parentheses in a sub, and then later using that word with the parentheses as a new public sub?

thanks!

Is This A Good Question/Topic? 0
  • +

Replies To: What does one call this?

#2 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1067
  • View blog
  • Posts: 4,174
  • Joined: 02-July 08

Re: What does one call this?

Posted 23 January 2014 - 08:13 PM

It is part of VB's syntax. It represents a method call. They also house parameters if any. So you can think of it as an empty set () means there are no parameters.

They are also used in arrays;

Dim str() As String ' this is a string array
Dim str As String   ' this is a string


Public Sub Foo(foobar As String)
  Me.Text = foobar
End Sub
'usage
Foo("Hello")

Was This Post Helpful? 1
  • +
  • -

#3 Minimalist  Icon User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 142
  • Joined: 13-November 13

Re: What does one call this?

Posted 24 January 2014 - 12:17 AM

In your example these are calls to functions or subroutines. You call these from within subs or functions to do something.
Was This Post Helpful? 0
  • +
  • -

#4 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2271
  • View blog
  • Posts: 9,499
  • Joined: 29-May 08

Re: What does one call this?

Posted 24 January 2014 - 03:29 PM

If the method call has no parameters you can remove them.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1