Thread: The goto doesnt work!

  1. #16
    Registered User
    Join Date
    Feb 2002
    Posts
    465
    for( ;; ){

    while ( thing1 != 100 ) {
    game1 = 3000 }

    thing2 = 10

    }

  2. #17
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    >>> I havent used goto since 1988 in BASIC

    Beat you by 10 years, since the Fortran-77 compiler was delivered in 1978.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #18
    Unregistered
    Guest
    DON'T USE GOTO!!!

  4. #19
    none
    Guest
    Originally posted by Esparno
    Ok, so how would i change this bit of example code into proper code?



    A:
    if (thing1==100)
    goto B;
    game1=3000;
    goto A;

    B:
    thing2=10;
    goto A;
    please, id like to know how too!

  5. #20
    The Artful Lurker Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633
    Originally posted by Esparno
    Ok, so how would i change this bit of example code into proper code?

    A:
    if (thing1==100)
    goto B;
    game1=3000;
    goto A;

    B:
    thing2=10;
    goto A;
    Code:
    while (1)
    {
      if ( thing1 == 100 )
        thing2 = 10;
      else
        game1 = 3000;
    }
    Jason Deckard

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GOTO statement in c++
    By kibestar in forum C++ Programming
    Replies: 8
    Last Post: 03-22-2009, 07:10 PM
  2. temperature sensors
    By danko in forum C Programming
    Replies: 22
    Last Post: 07-10-2007, 07:26 PM
  3. Why don't the tutorials on this site work on my computer?
    By jsrig88 in forum C++ Programming
    Replies: 3
    Last Post: 05-15-2006, 10:39 PM
  4. goto command
    By jhwebster1 in forum C Programming
    Replies: 3
    Last Post: 02-21-2006, 12:32 PM
  5. Does goto have a glitch or...?
    By Blackroot in forum C++ Programming
    Replies: 9
    Last Post: 02-18-2006, 10:40 AM