Page 2 of 5 <12345>
Topic Options
#66387 - 2002-06-09 04:13 PM Re: KiXtart Golf Tournament Part III !!!
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Jens, on the W2K issue. I have seen on NT4 the logout after logon caused by lack of permissions on the C:\winnt directory and subdirectories.

So we can shorten the variables and UDF name from what you specified in the rules?

Function BaseConverter($value,$frombase,$tobase)
...
Endfunction

To $f=a($b,$c,$d) ?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#66388 - 2002-06-09 05:00 PM Re: KiXtart Golf Tournament Part III !!!
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
jens,
well...
If I'm awake at the time of posting-enabled, i'll post competitor for howard.

no any 4.10 functionality... as I'm using 4.02 but I'll make a working one anyway.

have been scratching my hair for so many hours that can't give up anymore...

as time being 1800 and last night spent at this, I'll probably go to bed now when 10 base to any imageable base part is finished.
the rest is just 2-3 lines away...

cheers,
_________________________
!

download KiXnet

Top
#66389 - 2002-06-09 05:31 PM Re: KiXtart Golf Tournament Part III !!!
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I am still squashing some bugs that show themselves quite easily when converting to base2 using my approach. In case some one out there has implemented similiar functionality, I suggest that everyone verify proper functionality and result when BaseConverter("52",10,2) or BaseConverter("49",10,2).

[ 09 June 2002, 17:32: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#66390 - 2002-06-09 06:00 PM Re: KiXtart Golf Tournament Part III !!!
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
The Full Monty.

KixGolf score = 410

-Shawn

Top
#66391 - 2002-06-09 06:28 PM Re: KiXtart Golf Tournament Part III !!!
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
KixGolf score = 400

[ 09 June 2002, 18:37: Message edited by: Shawn ]

Top
#66392 - 2002-06-09 06:46 PM Re: KiXtart Golf Tournament Part III !!!
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Darn: [Frown]

KixGolf score = 446
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#66393 - 2002-06-09 07:35 PM Re: KiXtart Golf Tournament Part III !!!
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
KixGolf score = 397 [Big Grin] [Razz]

{edit} [Mad] [Frown]
forgot the
code:
$=B($v,$d,$e)  

KixGolf score = 410 [Frown]

Tweak Tweak Tweak
KixGolf score = 381 [Big Grin]

[ 09 June 2002, 19:59: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#66394 - 2002-06-09 08:29 PM Re: KiXtart Golf Tournament Part III !!!
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
ah - ok - going to play rough are we ? [Wink]

plus - do you dim your local vars ?

1sec ... [Wink] [Big Grin]

Howard, whats this:

$=B($v,$d,$e)

is that what your using to call your function ? did you change the function protoype as well ?

HI DANA EDDY !!! GOOD TO SEE YOU ONLINE !!!

[ 09 June 2002, 20:33: Message edited by: Shawn ]

Top
#66395 - 2002-06-09 08:37 PM Re: KiXtart Golf Tournament Part III !!!
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
That is the function call. I shortened it based on Jens comments earlier. I explicitly ask him for a ruling on "$=B($v,$d,$e)" vs. "$result=BaseConverter($value,$frombase,$tobase)", but he has yet to respond. Until then I was going to be aggressive. [Wink]

He said that the function call had to be included.

I only Dim'ed what was necessary for my code to function - (0). Oh, I am giving away the farm here. [Smile]

[ 09 June 2002, 20:38: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#66396 - 2002-06-09 08:48 PM Re: KiXtart Golf Tournament Part III !!!
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
well, guess we should get a ruling on this [Wink] but personally, i think we should be allowed to shorten anything that isn't exposed to the UDF user, so this would be the minimum prototype:

function baseconverter($v,$f,$t)

and probably all $vars should be dimmed because they could possibly affect the user as well.

oh yeah, and maybe going forward, the puzzle should be phrased as:

? baseconverter($v,$f,$t)

instead of

$result = baseconverter($v,$f,$t)

that way, we don't have to keep commenting and deleting lines to get a KiXgolf count.

[ 09 June 2002, 21:11: Message edited by: Shawn ]

Top
#66397 - 2002-06-09 09:07 PM Re: KiXtart Golf Tournament Part III !!!
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Based on the above discussion:

KixGolf score = 351 [Wink]

correction, forgot to put the quotes around the old and new base (in the call) [Frown]

[ 09 June 2002, 21:10: Message edited by: Shawn ]

Top
#66398 - 2002-06-09 09:11 PM Re: KiXtart Golf Tournament Part III !!!
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Crap [Frown]

{edit}
KixGolf score = 341 [Wink]

[ 09 June 2002, 21:53: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#66399 - 2002-06-09 10:07 PM Re: KiXtart Golf Tournament Part III !!!
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
KixGolf score = 337

its a mad house ! a maaaaaaad hoooooowse !!!!

[Wink]

its getting hard for me to understand my own udf [Smile]

[ 09 June 2002, 22:09: Message edited by: Shawn ]

Top
#66400 - 2002-06-09 10:11 PM Re: KiXtart Golf Tournament Part III !!!
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
My daughter wants to go to the pool. How is that going to happen if you keep cutting stroke off your score?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#66401 - 2002-06-09 10:16 PM Re: KiXtart Golf Tournament Part III !!!
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
LOL - Im trying to clean my pool - and my wife keeps yelling at me because I keep running down to the basement to check your score - ROFLMAO
Top
#66402 - 2002-06-09 10:34 PM Re: KiXtart Golf Tournament Part III !!!
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
KixGolf score = 331
Top
#66403 - 2002-06-09 11:03 PM Re: KiXtart Golf Tournament Part III !!!
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
KixGolf score = 293

Not including calling the function.. but includes all parts of the function! (THIS ONE WORKS, BABY!... fast, too!) (hmm. add 40 to get the test function given... but I don't think it should count.

Brian

{edit}
make that 289.. (hmm. i suppose it's bad code not to initialize variables?) Maybe still 293.. lol

{edit again}
make that 287... I don't think I can trim much more out of this, though.

{edit again}
ok.. make that 278... although I'm pretty positive with this method I can't get it any smaller..

[ 09 June 2002, 23:17: Message edited by: BrianTX ]

Top
#66404 - 2002-06-09 11:10 PM Re: KiXtart Golf Tournament Part III !!!
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Okay guys, I'm going to comment on the function call issue:
code:
$result=BaseConverter('44680832201','10','36')

is the function call to the UDF. Therefore I expect the function itself to be in this form in order to get the lowest score:
code:
FUNCTION BaseConverter($b,$c,$d)
;the code itself
ENDFUNCTION

To be fair, we should keep the function name itself as BaseConverter. With regards to the DIM issues, since KiXtart does not require to DIM a variable (according to the manual), you don't need to do it either, unless it would cause problems inside your code.

And, BTW, the call to the function does not count, just the function itself (FUNCTION to ENDFUNCTION). Oh, and if you're using another UDF that is called by your main UDF, that one of course counts too. Just in case somebody wrote a custom MOD() or POWER() UDF.

Finally, the BaseConverter doesn't need to work for fractional numbers, just integers. BrianTX, you asked for clarification [Wink]
_________________________
There are two types of vessels, submarines and targets.

Top
#66405 - 2002-06-09 11:11 PM Re: KiXtart Golf Tournament Part III !!!
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Brian, very nice ...

KixGolf score = 292

not including the call, and the prototype like this:

function baseconverter($n,$f,$t)

and to be honest, I don't think I can squeeze any more out of this puppy !!!

[ 09 June 2002, 23:13: Message edited by: Shawn ]

Top
#66406 - 2002-06-09 11:21 PM Re: KiXtart Golf Tournament Part III !!!
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
I found a slight bug in formatting.. fiddling with it.. may actually cut more code... or not! lol

Brian

[ 09 June 2002, 23:24: Message edited by: BrianTX ]

Top
Page 2 of 5 <12345>


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (mole) and 405 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.161 seconds in which 0.113 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org