Results 1 to 4 of 4

Thread: [RESOLVED] Tagged Functions

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2006
    Posts
    426

    Resolved [RESOLVED] Tagged Functions

    Excuse me, i found this function some where and i have never called my functions like this. I would like to know what it means to tag functions and how to call tagged functions like the one below.
    VB Code:
    1. Public Function [SelectArea](ByVal X As Integer, ByVal Y As Integer) As System.Drawing.Image
    2.        Return Me.SelectShapesByPoint(X, Y)
    3.     End Function

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Tagged Functions

    I have no idea what you're talking about. There is nothing out of the ordinary about that function it's just a function and you call it like you do any other function. I've never heard the term "tagged function" before. If you're talking about the square brackets that's doesn't mean anything. If you want to use a reserved word as an identifier you have to wrap it in square brackets or you'll get a syntax error. For instance, this would throw a compilation error because "Date" is a reserved word:
    VB Code:
    1. Dim date As DateTime
    You'd have to use square brackets to use that name as an identifier:
    VB Code:
    1. Dim [date] As DateTime
    Note that the variable is still called "date", not "[date]". The brackets are not part of the identifier, but only there to show that it is an identifier. Given that "SelectArea" is not a reserved word it serves no purpose in that instance.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2006
    Posts
    426

    Re: Tagged Functions

    Thanks JMC. Thats all i wanted to know. I just came up with the word tagged function, its really no there.

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Tagged Functions

    If you have no more further questions pertaining to this topic then please go to the Thread Tools menu and click Mark Thread Resolved. This will let other forum users know your question has been answered. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width