Results 1 to 8 of 8

Thread: VB.NET like c syntax?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325

    VB.NET like c syntax?

    Is it possible to do in VB.NET a statement like this C statement?
    Code:
    if ((x=MyFunction())==0)...
    Learn, this is the Keyword...

  2. #2
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: VB.NET like c syntax?

    Originally posted by Xmas79
    Is it possible to do in VB.NET a statement like this C statement?
    Code:
    if ((x=MyFunction())==0)...
    not in one line. You could either do this:
    If MyFunction() = 0 then...

    or

    x = MyFunction()
    if x = 0 then
    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!!

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325
    Yes, I supposed it... I was asking because I wanted to put it on loop like this:
    VB Code:
    1. While ((x=myfuct())<>0)
    2. 'code here
    3. end while
    I solved with:
    VB Code:
    1. do
    2. x=myfunct()
    3. 'code here
    4. loop while x<>0
    Learn, this is the Keyword...

  4. #4
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by Xmas79
    Yes, I supposed it... I was asking because I wanted to put it on loop like this:
    VB Code:
    1. While ((x=myfuct())<>0)
    2. 'code here
    3. end while
    I solved with:
    VB Code:
    1. do
    2. x=myfunct()
    3. 'code here
    4. loop while x<>0
    Why not:

    VB Code:
    1. Do
    2.     'code here
    3. Loop While MyFunct() <> 0

    ??
    My evil laugh has a squeak in it.

    kristopherwilson.com

  5. #5
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by The Hobo
    Why not:

    VB Code:
    1. Do
    2.     'code here
    3. Loop While MyFunct() <> 0

    ??
    because he probably wants to use x in the loop
    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

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325
    Yes, I want to use x
    Learn, this is the Keyword...

  7. #7
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    But why...?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  8. #8
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by The Hobo
    But why...?
    but why are you wondering why
    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!!

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