07-30-2003, 12:44 AM
Come on man, i don't care who wins. I never even enter these callenges becuase of the people who are supose to judge it. What annoys me is that you don't actually seem to understand any of the code. For instance, if it's the shortest code you wanted you would have seen that my first one was basically this. When you remove all the dims, functions, consts, defint, comments. All the things that make clear code. You would have gotten this. Which is quite a bit smaller then megs when you count actual lines of code. So i don't think you're qualified to judge this. In my opnion Antoni should have won. Even though it was basically my code replaced with a bit array. A bit array didn't come to my mind at first. So i think he should have won. Although i would have given him less points for coding style. He would still be the winner.
Code:
'$dynamic
dim shared keyTable( 7, 16383 ) as integer
open "valid.txt" for input a #1
while ( not eof( 1 ) )
input #1, currKey&
keyTable( currKey& \ 16384& , currKey& and 16383& ) = -1
wend
close #1
do
input "Enter a key or -1 to exit: ", keyToCheck&
if ( keyTable( keyToCheck& \ 16384& , keyToCheck& and 16383& ) = 0 ) then
print "Invalid key, quiting"
exit do
else
print "Valid key"
end if
loop
oship me and i will give you lots of guurrls and beeea