Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is my Logic wrong or QB64's ?
#8
Thumbs Up 
(10-15-2023, 12:13 PM)SMcNeill Wrote:
(10-15-2023, 11:50 AM)bplus Wrote: Y'all did see the code that skipped the IF test altogether, just added in everything and then subtracted out the one thing not wanted. Time wise, BIG savings!

Code: (Select All)
nc = 0
FOR i = -1 TO 1
    FOR j = -1 TO 1
        nc = nc + Cells(x + j, y + i)
    NEXT
NEXT
nc = nc - Cells(x, y)

Yeah I like how yours takes the calc's out of the For loop and puts them in the counting line.

Part of what makes Steve amazing is that he is also a connoisseur of coding method.
b = b + ...
Reply


Messages In This Thread
Is my Logic wrong or QB64's ? - by bplus - 10-15-2023, 08:15 AM
RE: Is my Logic wrong or QB64's ? - by SMcNeill - 10-15-2023, 09:20 AM
RE: Is my Logic wrong or QB64's ? - by bplus - 10-15-2023, 10:38 AM
RE: Is my Logic wrong or QB64's ? - by mnrvovrfc - 10-15-2023, 11:24 AM
RE: Is my Logic wrong or QB64's ? - by SMcNeill - 10-15-2023, 11:39 AM
RE: Is my Logic wrong or QB64's ? - by bplus - 10-15-2023, 11:50 AM
RE: Is my Logic wrong or QB64's ? - by SMcNeill - 10-15-2023, 12:13 PM
RE: Is my Logic wrong or QB64's ? - by bplus - 10-15-2023, 12:21 PM
RE: Is my Logic wrong or QB64's ? - by bplus - 10-15-2023, 04:56 PM



Users browsing this thread: 3 Guest(s)