asp die()

This is a discussion on asp die() within the Tech Board forums, part of the Community Boards category; I'm extending an online equipment and lab signup that the faculty at my school can use. The original author obviously ...

  1. #1
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357

    asp die()

    I'm extending an online equipment and lab signup that the faculty at my school can use. The original author obviously knew very little about programming, plus it's written in vbscript.

    Putting my complaints aside, is there a function similar to php's die()?

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    In C/C++?

    Yes, exit() or abort().
    Code:
    #include <stdlib.h>  /* C */
    #include <cstdlib>  // C++
    
    if(error) exit(1);
    if(another_error) abort();
    exit() is safer than abort(). You can also specify a value to exit with.

    [edit]
    If you're in main() just use
    Code:
    return value;  /* 0 for normal exit, nonzero for error */
    [/edit]
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357
    sorry I didn't specify, I meant asp vbscript.

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  5. #5
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357
    That's what I needed, thank you.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie class question
    By vastgoten in forum C++ Programming
    Replies: 4
    Last Post: 07-31-2008, 01:43 AM
  2. 1337 bible, Gen 11
    By Paz_Rax in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 05-20-2005, 09:40 PM
  3. Pointers (die! die! die! )
    By BatmaN77 in forum C++ Programming
    Replies: 4
    Last Post: 06-01-2002, 06:11 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21