Results 1 to 25 of 25

Thread: whats the quicker way to write x = x + 1

  1. #1

    Thread Starter
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727

    whats the quicker way to write x = x + 1

    ?

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    By copy paste:

    x = x + 1

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Or was this one of those rare serious questions?

    x++
    x+=1
    (x+1)


  4. #4

    Thread Starter
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727
    it was, cheers

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

  6. #6
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    x=x+1
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  7. #7
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    C++ or VB?
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  8. #8
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Or ASM...EEK...

  9. #9
    Banned
    Join Date
    Oct 2004
    Posts
    0
    none of you are right im righter

  10. #10
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106
    I'm glad that .NET has included x+=1. Now how about X++?
    My usual boring signature: Nothing

  11. #11
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    xup1
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  12. #12
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Originally posted by Shaggy Hiker
    I'm glad that .NET has included x+=1. Now how about X++?

    You can run by pressing in B...then you jump by pressing A, and if you land on that gigantic mushroom then you will be ONE greater.....

  13. #13
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106
    I haven't a clue what you are talking about. Perhpas it all relates to that mushroom you are mentioning.
    My usual boring signature: Nothing

  14. #14
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Originally posted by Shaggy Hiker
    I haven't a clue what you are talking about. Perhpas it all relates to that mushroom you are mentioning.
    I am talking about Super Mario Bros....1UP....

  15. #15
    Fanatic Member brown monkey's Avatar
    Join Date
    Jun 2004
    Location
    Cebu
    Posts
    552
    Originally posted by Shaggy Hiker
    I'm glad that .NET has included x+=1. Now how about X++?
    If C#, C++, J#, yes. If VB, no.

    I don't know about Cobol.

  16. #16
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    X is always equal to X+1

  17. #17
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901
    COBOL

    ADD 1 TO VALUE-OF-X.

  18. #18
    Fanatic Member brown monkey's Avatar
    Join Date
    Jun 2004
    Location
    Cebu
    Posts
    552


    I only know
    Code:
           procedure division.
           main.
               display "hello world".
               stop run.

  19. #19
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    I learnt cobol but cant remember any of it
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  20. #20
    Frenzied Member mar_zim's Avatar
    Join Date
    Feb 2004
    Location
    Toledo Cebu City.
    Posts
    1,416
    Originally posted by BodwadUK
    I learnt cobol but cant remember any of it
    Even the Environment Division?

  21. #21
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    when I say any I mean any
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  22. #22
    Fanatic Member JPicasso's Avatar
    Join Date
    Aug 2001
    Location
    Kalamazoo, MI
    Posts
    843

    Re: whats the quicker way to write x = x + 1

    Originally posted by davebat
    ?
    You've wasted more time and engery posting this query than you'll
    ever gain by shortening that line of code.

    And now you've wasted my time too.
    Merry Christmas

  23. #23
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Originally posted by BodwadUK
    when I say any I mean any
    Yeah Mar_zim, when the big dog barks, YOU LISTEN!

  24. #24
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465
    x1up=x++#1

  25. #25
    Lively Member Wally Pipp's Avatar
    Join Date
    Jan 2002
    Location
    Carnivàle
    Posts
    79
    x augmented with one equals x
    A post brought to you by the Grim Reaper Appreciation Society™

    "Buy your lifetime subscription now and save on your coffin"

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