The goto doesnt work!

This is a discussion on The goto doesnt work! within the C++ Programming forums, part of the General Programming Boards category; for( ;; ){ while ( thing1 != 100 ) { game1 = 3000 } thing2 = 10 }...

  1. #16
    ...
    ... is offline
    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,831
    >>> 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
    B26354 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

Page 2 of 2 FirstFirst 12
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, 08:10 PM
  2. temperature sensors
    By danko in forum C Programming
    Replies: 22
    Last Post: 07-10-2007, 08: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, 11: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

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