Loop question...

Discussion in 'OT Technology' started by Keywerd Aohell, Nov 15, 2004.

  1. Keywerd Aohell

    Keywerd Aohell New Member

    Joined:
    Nov 17, 2003
    Messages:
    460
    Likes Received:
    0
    Ok, i'm a complete noob at programming, but I believe when I used visual basic back in the day for shits and giggles that You could code a sequence or string (not sure if this is right right term) and name it i.e. OT ? And then use a command like Loop(OT). Is this anywhere near right? Any help would be appreciated, and please excuse my complete and utter ignorance.
     
  2. Keywerd Aohell

    Keywerd Aohell New Member

    Joined:
    Nov 17, 2003
    Messages:
    460
    Likes Received:
    0
    somebody's gotta remember lol
     
  3. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    what are you trying to do? I'm totally confused by the question. And in what language?
     
  4. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    I think you're talking about functions and VB does allow this:

    Function Multiply2Numbers(First as double, Second as double) as double

    multiply2numbers = first * second

    end function

    Then in your main code:

    debug.print Multiply2Numberbers(3,4)

    would output

    12 in the debug window
     
  5. IAMwhitey

    IAMwhitey New Member

    Joined:
    Nov 8, 2001
    Messages:
    1,010
    Likes Received:
    0
    Location:
    Pittsburgh, PA
    yes more detail would be very helpful... but it does look like you are trying to call a function
     
  6. Keywerd Aohell

    Keywerd Aohell New Member

    Joined:
    Nov 17, 2003
    Messages:
    460
    Likes Received:
    0
    The language would have been Visual Basic version I couldn't tell you. I was just trying to remember if there was a "loop" command. And if you could I guess recall a function and put it in a loop, and how that would be coded. Not really trying to do anything extremely important was just curious what an old school loop function would look like.
     
  7. Keyzs

    Keyzs OT Supporter

    Joined:
    Nov 3, 2003
    Messages:
    814
    Likes Received:
    0
    Location:
    Charlotte, MI
    Code:
    Dim x as integer
    x = 0
    
    Do while x < 10
        x = x + 1
       [enter code]
    loop
    
     
  8. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    OMG, U h4x0red my computer! :noes:
     

Share This Page