Results 1 to 12 of 12

Thread: Can you list the uses of the "As" clause?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Talking Can you list the uses of the "As" clause?

    these are the ones that I know
    -Delegate Function foo() As String
    -Function foo() As String
    -Private myVariable As String


    where else can the "As" clause appear? I need to know, believe me


    edit: more...
    -Enum foo As Integer
    -Property something () as Boolean
    Last edited by MrPolite; Jan 14th, 2004 at 11:28 PM.
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    Public MySub(ByVal Name As String)

    End Sub

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by DevGrp
    Public MySub(ByVal Name As String)

    End Sub
    thanks
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    Is this homework

  5. #5

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by DevGrp
    Is this homework
    hehe nope
    I'm writing a program that's supposed to load a solution file in a treeview control (just as it would appear in the Object Browser), and I need to read the .VB files line by line and determine what each line means.... I couldnt find an easy way to determine if something is a variable or not, so I thought if I know where the "as" clause appears, and I eliminate all the possiblities, I can figure out if a line in the file is a variable declaration or not (hope it makes sense)
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    This list is from MSDN Help . Check it out for more info .

    VB Code:
    1. 'The As keyword introduces an As clause, which identifies a data type.
    2. 'The As keyword is used in these contexts:
    3.  
    4.  
    5. Const Statement
    6. Declare Statement
    7. Delegate Statement
    8. Dim Statement
    9. Enum Statement
    10. Event Statement
    11. For...Next Statements
    12. For Each...Next Statements
    13. Function Statement
    14. Property Statement
    15. Sub Statement
    16. Try...Catch...Finally Statements

  7. #7

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by Pirate
    This list is from MSDN Help . Check it out for more info .

    VB Code:
    1. 'The As keyword introduces an As clause, which identifies a data type.
    2. 'The As keyword is used in these contexts:
    3.  
    4.  
    5. Const Statement
    6. Declare Statement
    7. Delegate Statement
    8. Dim Statement
    9. Enum Statement
    10. Event Statement
    11. For...Next Statements
    12. For Each...Next Statements
    13. Function Statement
    14. Property Statement
    15. Sub Statement
    16. Try...Catch...Finally Statements
    thanks pirate, sounds like I missed a couple of those, but I think my app if working now (kinda)
    here's a screenshot. You just give it the solution file and it loads everything in a treeview. You can save it to a file too! hehe
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  8. #8
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    wow , it looks damn cool . Did that take you long and hard work (just wondering) ?

  9. #9

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by Pirate
    wow , it looks damn cool . Did that take you long and hard work (just wondering) ?
    made it today hehe thanks... dunno what I'm doing yet

    umm btw about the hardwork-> there are too many recursive functions, that was annoying
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  10. #10
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by MrPolite
    made it today hehe thanks... dunno what I'm doing yet

    umm btw about the hardwork-> there are too many recursive functions, that was annoying
    Recursion ! . It's bothering me also . I couldn't get a way to handle a progressbar while recursion is doing some process , at least untill now.
    I made a tool (funny one ) . Seems we're programming same route .
    Attached Images Attached Images  

  11. #11

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    "backup tool"? sounds nice....
    yeah seems like you're working with files and directories... hehe same mess

    hmm, maybe you could count all the files and as you are done with each file you could add 1 to the progress bar's value... but the better one would be to calculate the size of all the files together and then increment the progressbar depending to the number of bytes processed hehe but I guess that would be even messier
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  12. #12
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Yah , this logic might work (it's reasonable) but the thing is that I can't estimate when this ****ing recursive ends ! But I'll make it work .

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