Page 106 of 120

Re: Trying something out

Posted: Sun Jan 01, 2012 5:47 pm
by LikesShinyThings
Lambda Force wrote: A stitch in time saves nine.
Wait a minute... didn't someone already say that? Are we repeating ourselves now? It feels like deja vu.

Re: Trying something out

Posted: Sun Jan 01, 2012 5:49 pm
by Lambda Force
I prefer Dejah Thoris.

Re: Trying something out

Posted: Sun Jan 01, 2012 5:50 pm
by WildBill
LikesShinyThings wrote:
Lambda Force wrote: A stitch in time saves nine.
Wait a minute... didn't someone already say that? Are we repeating ourselves now? It feels like deja vu.
Nobody said that in this thread.

Re: Trying something out

Posted: Sun Jan 01, 2012 8:29 pm
by MasterOfNone
WildBill wrote:
LikesShinyThings wrote:
Lambda Force wrote: A stitch in time saves nine.
Wait a minute... didn't someone already say that? Are we repeating ourselves now? It feels like deja vu.
Nobody said that in this thread.
Wait a minute... didn't someone already say that? Are we repeating ourselves now? It feels like deja vu.

Re: Trying something out

Posted: Sun Jan 01, 2012 8:36 pm
by rubio
20 GOTO 10

Re: Trying something out

Posted: Sun Jan 01, 2012 11:24 pm
by sjfcontrol
Hmmm, I haven't seen a "goto" in a number of decades -- you're showing your age...

Re: Trying something out

Posted: Mon Jan 02, 2012 10:00 am
by LikesShinyThings
sjfcontrol wrote:Hmmm, I haven't seen a "goto" in a number of decades -- you're showing your age...
Isn't that a legit command in TransSQL? I'm pretty sure I've seen it in some relatively new code.

Re: Trying something out

Posted: Mon Jan 02, 2012 11:02 am
by sjfcontrol
LikesShinyThings wrote:
sjfcontrol wrote:Hmmm, I haven't seen a "goto" in a number of decades -- you're showing your age...
Isn't that a legit command in TransSQL? I'm pretty sure I've seen it in some relatively new code.
It is a legit command in many languages. But it is generally considered **EVIL** ;-)

Here's what 'ruby'' has to say about it: http://raa.ruby-lang.org/project/ruby-goto/

Image

Re: Trying something out

Posted: Mon Jan 02, 2012 1:31 pm
by MasterOfNone
I hear "Go to ..." from my wife all the time.

Re: Trying something out

Posted: Mon Jan 02, 2012 1:36 pm
by sjfcontrol
MasterOfNone wrote:I hear "Go to ..." from my wife all the time.
I suggest trying to be nicer to her. I understand they like shiny things. Especially if made of carbon...

Re: Trying something out

Posted: Mon Jan 02, 2012 1:39 pm
by LikesShinyThings
sjfcontrol wrote:
LikesShinyThings wrote:
sjfcontrol wrote:Hmmm, I haven't seen a "goto" in a number of decades -- you're showing your age...
Isn't that a legit command in TransSQL? I'm pretty sure I've seen it in some relatively new code.
It is a legit command in many languages. But it is generally considered **EVIL** ;-)

Here's what 'ruby'' has to say about it: http://raa.ruby-lang.org/project/ruby-goto/

Image
Oooo.... must... resist... desire... to... discuss.... I don't want to accidentally give this thread a theme. Besides, who wants to bore the non-programmers (especially so early in the year) with design theory?

Time to go clean a gun. :mrgreen:

Re: Trying something out

Posted: Mon Jan 02, 2012 1:49 pm
by MasterOfNone
LikesShinyThings wrote:Time to goto clean a gun. :mrgreen:
See? Goto is still a part of our lives.

Re: Trying something out

Posted: Mon Jan 02, 2012 2:23 pm
by tbrown

Code: Select all

For Each Magazine In Rangebag
     Gun.Add = Magazine 
     Gun.Slide.Close 
     Do While Gun.Magazine.Empty = False       
          With Gun
          .Aim 
          .Shoot 
          End With
     Loop 
     Gun.Magazine.Eject 
Next Magazine

If Gun.Type <> "Glock" Then 
     Gun.Clean  
End if  

Re: Trying something out

Posted: Mon Jan 02, 2012 2:32 pm
by sjfcontrol
tbrown wrote:

Code: Select all

For Each Magazine In Rangebag
     Gun.Add = Magazine 
     Gun.Slide.Close 
     Do While Gun.Magazine.Empty = False       
          With Gun
          .Aim 
          .Shoot 
          End With
     Loop 
     Gun.Magazine.Eject 
Next Magazine

If Gun.Type <> "Glock" Then 
     Gun.Clean  
End if  
Hmmm, maybe it should start with "Goto Range""? :biggrinjester:

Re: Trying something out

Posted: Mon Jan 02, 2012 3:04 pm
by tbrown
sjfcontrol wrote:Hmmm, maybe it should start with "Goto Range""? :biggrinjester:
It's better practice to use the .Range property.