123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|581|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Question of the Day -> QOTD : Oh yeah! Duh!!

Tue, 09 Sep 2008, 07:48
Jayenkai
We've all done it!

I spent AGES making a "remainder" function.. It had a huge while loop in it, which slowly but surely deleted the smaller number, until the larger one was smaller than the small one.
That number was the remainder.
Simple, effective..

Remainder(x,y)

..
Then someone mentioned that that's what "x Mod y" ("x % y" in C) does..

Bahh......

QOTD : What really neat thing have you coded, only to discover that it's already in there, just under a really weird name that you'd never have guessed.

-=-=-
''Load, Next List!''
Tue, 09 Sep 2008, 18:18
Forklift_Fred
Not especially cool but I was using a For...Next loop and If Mid$() to search for commas within a string... iterating through a CSV...

...

Then discovered Instr()


Doh!

-=-=-
Come rain or shine...
Fri, 12 Sep 2008, 03:28
JL235
I've done similar to Forklift Freds CSV parsing (in Java) where I go through stripping out each word at a time in a loop adding them to a list, which I then turned into an array. Then I realised you could just do: line.split(',')