View Poll Results: What is you favoutite loop variable?

Voters
21. You may not vote on this poll
  • x

    4 19.05%
  • n

    1 4.76%
  • k

    1 4.76%
  • i

    12 57.14%
  • j

    0 0%
  • y

    0 0%
  • Other...

    3 14.29%
Results 1 to 32 of 32

Thread: Favourite Variable...

  1. #1

    Thread Starter
    Lively Member Jamagei's Avatar
    Join Date
    Jul 2000
    Location
    running from you. You freak.
    Posts
    69

    Favourite Variable...

    I'm bored. Can you tell?
    Last edited by Jamagei; Mar 13th, 2002 at 07:14 AM.
    Now, aren't you sorry you didn't just keep on scrolling?

  2. #2
    Lively Member Wally Pipp's Avatar
    Join Date
    Jan 2002
    Location
    Carnivàle
    Posts
    79
    err ... what are favoutits ? Are they like the real thing ?

    BTW. I always call my variables Charlie
    A post brought to you by the Grim Reaper Appreciation Society™

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

  3. #3

    Thread Starter
    Lively Member Jamagei's Avatar
    Join Date
    Jul 2000
    Location
    running from you. You freak.
    Posts
    69
    damn the typos.

    And I can't change it
    Now, aren't you sorry you didn't just keep on scrolling?

  4. #4
    Lively Member Wally Pipp's Avatar
    Join Date
    Jan 2002
    Location
    Carnivàle
    Posts
    79
    psssst, press edit an errr well edit it !
    A post brought to you by the Grim Reaper Appreciation Society™

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

  5. #5

    Thread Starter
    Lively Member Jamagei's Avatar
    Join Date
    Jul 2000
    Location
    running from you. You freak.
    Posts
    69
    You can't edit a poll once it is up there. Only Mods can do that.
    Now, aren't you sorry you didn't just keep on scrolling?

  6. #6
    Lively Member Wally Pipp's Avatar
    Join Date
    Jan 2002
    Location
    Carnivàle
    Posts
    79
    I'm so so so so sorry
    A post brought to you by the Grim Reaper Appreciation Society™

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

  7. #7

    Thread Starter
    Lively Member Jamagei's Avatar
    Join Date
    Jul 2000
    Location
    running from you. You freak.
    Posts
    69
    So you bloody well should be
    Now, aren't you sorry you didn't just keep on scrolling?

  8. #8
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    Favoutites are what westie (emm to internationalise, the poorer burbs) girls put on before they hit the local pub on a saturday night.


    I dont never ever neverrrrr use letters for loops. Well i do but i join a few of them together... they always mean something to me and sometimes remind me of that time in Paris walking along the Champs Elysees humming "don't blame it on the sunshine... don't blame it on the moonlight... "
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  9. #9
    Addicted Member Martin Wilson's Avatar
    Join Date
    Mar 2002
    Location
    :)
    Posts
    236
    I use i, I always have and always will.

    Don't ask me why, I like pie and the sky.
    Don't ask me why, I sometimes lie and buy.
    Don't ask me why, why? Cos I am shy!
    Don't ask me why!



    Hey, I'm a poet and I don't know that I ... ooops!
    Last edited by Martin Wilson; Mar 13th, 2002 at 07:07 AM.

  10. #10
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    Scary thing there Marty... u've edited that post and so I assume that the prev poem was even worse??
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  11. #11
    Lively Member Wally Pipp's Avatar
    Join Date
    Jan 2002
    Location
    Carnivàle
    Posts
    79
    VB Code:
    1. Public Sub Charlie(Charlie As Integer, Optional Charlie As String)
    2. Dim Charlie As Integer
    3. For Charlie = Charlie To Charlie Step -1
    4.       Charlie = Charlie & " does "
    5. Next
    6. End Sub

    Sounds perfectly logical to me. You've only one variable name to remember.
    A post brought to you by the Grim Reaper Appreciation Society™

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

  12. #12
    Addicted Member Martin Wilson's Avatar
    Join Date
    Mar 2002
    Location
    :)
    Posts
    236
    It was badly formatted!
    don't ask me why, i like pie and the sky don't ask me why, i sometimes lie and buy don't ask me why why cos I am shy don't ask me why

  13. #13
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    iFlag for me
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  14. #14
    Addicted Member Martin Wilson's Avatar
    Join Date
    Mar 2002
    Location
    :)
    Posts
    236
    Or in my case:
    VB Code:
    1. Public Sub i(i As Integer, Optional i As String)
    2. Dim i As Integer
    3. For i = i To i Step -i
    4.       i = i & " i "
    5. Next i
    6. End Sub

  15. #15
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    Originally posted by Martin Wilson
    It was badly formatted!
    T'were that was all that was bad
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  16. #16

    Thread Starter
    Lively Member Jamagei's Avatar
    Join Date
    Jul 2000
    Location
    running from you. You freak.
    Posts
    69
    My most humble apologies Wally. I made the same typo in the question for the poll and it was that to which I thought you were refering. I have now edited the title.

    I subjugate myself to you.

    Now, aren't you sorry you didn't just keep on scrolling?

  17. #17
    Lively Member Wally Pipp's Avatar
    Join Date
    Jan 2002
    Location
    Carnivàle
    Posts
    79
    Good show old man !
    A post brought to you by the Grim Reaper Appreciation Society™

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

  18. #18
    Addicted Member Martin Wilson's Avatar
    Join Date
    Mar 2002
    Location
    :)
    Posts
    236
    BeachBum -
    What are you suggesting? That I am not a poet!
    Time for some digesting...and don't I know it!

  19. #19
    Lively Member Wally Pipp's Avatar
    Join Date
    Jan 2002
    Location
    Carnivàle
    Posts
    79
    BB is always suggesting things to people, usually of sexual nature.
    This is the kind of mind that man has.
    You should see him at the Mardi Gras. Pictures are circulation the Internet
    A post brought to you by the Grim Reaper Appreciation Society™

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

  20. #20

    Thread Starter
    Lively Member Jamagei's Avatar
    Join Date
    Jul 2000
    Location
    running from you. You freak.
    Posts
    69
    Originally posted by Wally Pipp
    BB is always suggesting things to people, usually of sexual nature.
    This is the kind of mind that man has.
    You should see him at the Mardi Gras. Pictures are circulation the Internet
    BB's a man!!

    He must have tucked it back at the mardi gras when we met....

    Now, aren't you sorry you didn't just keep on scrolling?

  21. #21
    Hyperactive Member gravyboy's Avatar
    Join Date
    Jan 2000
    Location
    Where I was before . . . if you don't know then you're new!
    Posts
    334
    S'gotta be strSQL . . . .
    Matt G
    VS6 Ent SP5 @ Work
    VS6 Ent SP5 & VB.Net @ Home
    [email protected]



  22. #22
    Addicted Member Guru's Avatar
    Join Date
    May 2000
    Location
    sulking in the cupboard under the stairs
    Posts
    237
    Originally posted by gravyboy
    S'gotta be strSQL . . . .
    That's a pretty unusual choice of loop variable.
    Another light-hearted post from Guru

  23. #23
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796
    I don't use loops.

    Loops are for losers...
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  24. #24
    DerFarm
    Guest
    Like most people who learned Fortran as one of the first
    languages I,J and K are the favoured loop variables. In Fortran
    (at least those Fortrans that were in vogue in the 70's) any
    variable that begain with the letters I,J or K were automatically
    typed as integer.....meaning you didn't have to declare them.

    For non-loop variables I prefer KKK and xxx.

    Simon......awwww forget it. If it has to be explained, you
    wouldn't be able to understand.

  25. #25

    Thread Starter
    Lively Member Jamagei's Avatar
    Join Date
    Jul 2000
    Location
    running from you. You freak.
    Posts
    69
    I actually use k for no other reason than there were alot of Subs that had X (not x) as variables and it changed the entire set of x variables we had to upper case. It always defaulted to upper case as well, even when we changed them (or we might have missed some) but I couldn't stand the look of

    Code:
    For X = 0 to 10
    
    instead of 
    
    For x = 0 to 10
    So I started using k because it's nearly an x
    Now, aren't you sorry you didn't just keep on scrolling?

  26. #26
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    not that anyone cares but I start with x, if I use another in the same sub that would be y, then z, then if I need more I start from the beginning, e.g a, b, c etc

    Hell, it's fun.

  27. #27
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796
    Simon......awwww forget it. If it has to be explained, you
    wouldn't be able to understand.
    Don't worry, I do use loops really. I just wanted to be different...

    As for variable naming, I always stick to rigid variable naming conventions (even for lowly loop variables) so I use:

    intCount

    A bit more of a pain to type but, a convention's a convention.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  28. #28
    Fanatic Member Gaffer's Avatar
    Join Date
    Nov 2000
    Location
    London
    Posts
    828
    I have been known to use starsky and hutch as named ranges in excel...

  29. #29
    Lively Member Wally Pipp's Avatar
    Join Date
    Jan 2002
    Location
    Carnivàle
    Posts
    79
    See ?

    And you were laughing when I said I name them Charlie, S and Angels ...
    A post brought to you by the Grim Reaper Appreciation Society™

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

  30. #30
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    recursion all the way...
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  31. #31
    Hyperactive Member gravyboy's Avatar
    Join Date
    Jan 2000
    Location
    Where I was before . . . if you don't know then you're new!
    Posts
    334
    OK . . . OK . . . . . I read the title of the thread and stupidly thought that the poll was the same . . . . ah well . . . .

    In that case I nominate intLoop. I use it in the sense of a prefix . . . ie intLoopX and intLoopY when populating a chart or intLoopDays & intLoopHours when going through the week etc.

    S'that alright now?
    Matt G
    VS6 Ent SP5 @ Work
    VS6 Ent SP5 & VB.Net @ Home
    [email protected]



  32. #32
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Code:
    for(list<string>::iterator i = m_items.begin(); i != m_items.end(); ++i) {
        // ...
    }
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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