Results 1 to 9 of 9

Thread: end or goto?

  1. #1

    Thread Starter
    Addicted Member cwm's Avatar
    Join Date
    Mar 2000
    Posts
    133

    end or goto?

    does asp support a goto or end like visual basic does?

    so i can just get out of the whole program if i want to...

  2. #2
    chenko
    Guest
    To stop the code running you use

    Code:
    Response.End
    as for the GoTo, even if there was one I wouldnt use it.

  3. #3

    Thread Starter
    Addicted Member cwm's Avatar
    Join Date
    Mar 2000
    Posts
    133
    thank god, i was going crazy trying to get if statements to guide me to the end of the program.. thanks!
    Generic vb 5

    Private Sub WakeMyAssUp( As Boolean)
    If Then : = False
    End Sub

  4. #4
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Just a side note, be careful with the End statement in VB.. it literally just stops the program and leaves any memory allocated for objects that have not been set to Nothing.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  5. #5
    Addicted Member csammis's Avatar
    Join Date
    Mar 2001
    Location
    /dev/null
    Posts
    226
    In VB you should be careful with Gotos too (beyond the obvious reasons), because in VB.NET they're gone completely! Muwhahahaha! Even the On Error statement is gone...I've been trying to some time to eliminate all Gotos from my code, and the only parts left are the "On Error Goto ohCrud"...that'll be easily replaced, though, with "Try Catch" clauses...I'm gonna love .NET
    Things I've Said:
    "Life's funny like that...elephants can wear frilly lace panties, and Dubya still looks like a monkey in a big chair"
    "Take four goats and strap one to each foot of a llama. Presto, goat-powered llama!"
    "You want to get me to work more, get me a Coke. No? Then deal with inferior garbage, I'm not coding another line and your clients can go to......thanks, I'd love a Coke right about now!"

  6. #6
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Yeah, I like the "Try Catch" method of error handling a lot better. It makes more sense to me.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  7. #7
    Addicted Member csammis's Avatar
    Join Date
    Mar 2001
    Location
    /dev/null
    Posts
    226
    Has anyone else noticed that VB.NET is what looks like M$'s attempt at a unified language, between Java C++ and VB?
    Things I've Said:
    "Life's funny like that...elephants can wear frilly lace panties, and Dubya still looks like a monkey in a big chair"
    "Take four goats and strap one to each foot of a llama. Presto, goat-powered llama!"
    "You want to get me to work more, get me a Coke. No? Then deal with inferior garbage, I'm not coding another line and your clients can go to......thanks, I'd love a Coke right about now!"

  8. #8
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    I think MS saw Java as a threat, so they tried to control it - Visual J++ -> Sun lawsuit. When that didn't work, they create their own similiar technology and start hyping it as the next big thing.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  9. #9
    Addicted Member csammis's Avatar
    Join Date
    Mar 2001
    Location
    /dev/null
    Posts
    226
    Fair enough, makes sense to me. What got me thinking was this:

    At one point I was reading a book on C#, and then a book on VB.NET...both of them have taken on aspects of a unified language. Speaking specifically of VB.NET, it has picked up things such as Java's really heavy dot notation, and things like the way Java handles graphics:
    Code:
    Graphic g;
    g = getGraphics();
    g.drawText "Blah blah blah"
    On the other major front, it has some of the more object-oriented aspects of C++, such as polymorphism and inheritance. VB.NET, like I said above, has gotten rid of goto (I think C# did too) and started using the Try-Catch statement for error handling. It also looks to be more powerful than previous versions of VB, but also more tightly integrated with the whole .NET subsystem and Windows as a whole.

    It is beginning to look like MS is creating a unified language, which would work as easily for DirectX as it would for web browsing. Who knows, perhaps VB8 will be that unified language, but I hope not, for reasons I'm about to say... (before I go farther, let me say that I am speaking hypothetically, I'm not a psychic or a doomsayer (kinda), I just want to speak what I'm thinking and get other people's ideas:
    [list=1][*]This language, while being immensely powerful, would generate a fierce kind of overhead. How lightweight could it possibly be, packed with the beneficial functions (as MS sees them) of every major language? Yes, computers are being made with the capacity for GBs of RAM, but the art of computer programming is making something as small and yet as fast as possible...while sometimes it can't be avoided, no self-respecting programmer wants to create bloatware.[*]People screamed bloody murder when MS integrated Internet Explorer into their OS. They recently beat the charges of monopoly on that count, proving in their minds that they can do anything by circumventing the legal system. When (if) MS creates this language, it will force not for profit languages like Java down and out and put MS in the focus, with no place to run or hide. Not even Unix....[*]....because it was announced recently that MS was working with a *nix vendor (can't remember which one) to port C# to Unix/Linux. They're getting their hand in every pie they can reach...if *nix's fall to the MS touch, then there is literally no escape. Linux has been the outstanding "can't touch this" player in the Anti-MS arena. Apple has MS Office ported to it, so they're out.[/list=1]

    Well, that's my feelings on the subject (I'm long-winded)...post if you've got 'em
    Things I've Said:
    "Life's funny like that...elephants can wear frilly lace panties, and Dubya still looks like a monkey in a big chair"
    "Take four goats and strap one to each foot of a llama. Presto, goat-powered llama!"
    "You want to get me to work more, get me a Coke. No? Then deal with inferior garbage, I'm not coding another line and your clients can go to......thanks, I'd love a Coke right about now!"

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