#66427 - 2002-06-10 03:24 AM
Re: KiXtart Golf Tournament Part III !!!
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
I don't know if they are bugs or not.. I mean.. must the INT, FIX, MOD work for numbers of type CDBL? ... I think ROUND works, but I wouldn't stake my life on it. The CINT is designed to even out error due to .5 calculations. I assumed that the other types were put in to support external objects and methods, but not necessarily designed to do actual calculations in KiXtart. I could be wrong, however. I noticed there was support for the type "long integer" but it's these are types that may not work the same way as the standard types. (I will go ahead and post something, though)
Brian [ 10 June 2002, 16:19: Message edited by: BrianTX ]
|
Top
|
|
|
|
#66428 - 2002-06-10 05:58 AM
Re: KiXtart Golf Tournament Part III !!!
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
KixGolf score = 283
I think I am about at the end of my rope here. Can't see much more improvement being squeezed out of this script. [ 10 June 2002, 05:59: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#66429 - 2002-06-10 06:06 AM
Re: KiXtart Golf Tournament Part III !!!
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Hmm. ya know.. if you get it down to 261, I will assume you have (near) identical code to mine with the variables changed. lol
Brian
|
Top
|
|
|
|
#66430 - 2002-06-10 07:19 AM
Re: KiXtart Golf Tournament Part III !!!
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
KixGolf score = 253
I think it is legal.
|
Top
|
|
|
|
#66432 - 2002-06-10 01:55 PM
Re: KiXtart Golf Tournament Part III !!!
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Hmm. you got it to 253, Howard? hmm. I may have to revisit mine again... lol.. I think it's done, though.
Brian
{Edit} If I don't initialize my variables, I can get mine to 252 ... But it only works if:
#1 you're not using a specific variable before calling the function...
#2 you're not calling the function twice. ..... If that's what you're doing, I think it's best to initialize the variables... If I can break your code by having certain variables preexisting, then I don't think it's valid code... Just my 2 cents. [ 10 June 2002, 14:10: Message edited by: BrianTX ]
|
Top
|
|
|
|
#66433 - 2002-06-10 02:25 PM
Re: KiXtart Golf Tournament Part III !!!
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Well this is where I'm torn. The task was not to develop practical for use in someone application but to provide the output required for a specific input. In this sense, I think the result you describe is valid for KixGolf. Naturely these items and other safe guards would have to be inplemented for more bullet proof code used publicly.
Now for real question, if you are retuning the result back through the $BaseConverter name, then I'm toast and have to conceed. If we only have to get the answer to the screen then, I'm right there nipping at your heels.
|
Top
|
|
|
|
#66434 - 2002-06-10 02:27 PM
Re: KiXtart Golf Tournament Part III !!!
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
I'm getting 261 through the baseconverter name... and 253 through the baseconverter name if I assume that it's a script by itself (needs no variables initialized that are 0 or nul.)
Brian
|
Top
|
|
|
|
#66435 - 2002-06-10 02:31 PM
Re: KiXtart Golf Tournament Part III !!!
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Crap.
Well I have to conceed then. My best is 278 returning the answer throught $BaseConverter.
Execellent job Brian!!
|
Top
|
|
|
|
#66436 - 2002-06-10 02:37 PM
Re: KiXtart Golf Tournament Part III !!!
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
yap - and my base 10 to base N routine is on the operating table ... plus, I would have had a tough time shaving down to where you guys are anyways ... unless one of you want to be a sport and donate one of your algorithms
|
Top
|
|
|
|
#66437 - 2002-06-10 03:00 PM
Re: KiXtart Golf Tournament Part III !!!
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
I'm going to call it 261.... It includes creating the function and everything between:
code:
Function BaseConverter($v,$f,$t) . . . EndFunction
The clarification from Jens was that it be JUST the function, including the Function/Endfunction lines.
Brian
P.S. Jens, you said it was supposed to last 48 hours.. according to my calculations, 48 hours from your posting time would be in 1.5 hours, even though you said 3 PM EST... I guess I have an itchy trigger finger!!! lol... another thought.. if you want to set the end time, would it be wise to create a NEW topic for posting when the time is up? I mean... this one is getting pretty LONG!!! [ 10 June 2002, 15:08: Message edited by: BrianTX ]
|
Top
|
|
|
|
#66439 - 2002-06-10 03:15 PM
Re: KiXtart Golf Tournament Part III !!!
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Actually, before it would go into the UDF library (according to coding conventions), it might be wise to check inputs. I mean... only letters and numbers should be allowed, and all the numerals in a base x number should be less than x, and the bases should be between 2 and 36... Otherwise, if someone passes invalid data it could cause their script to stop completely.
Someone else can add that stuff to my script if they want! lol
Brian
|
Top
|
|
|
|
#66440 - 2002-06-10 04:38 PM
Re: KiXtart Golf Tournament Part III !!!
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Another question, Jens, since we are at the 48 hour mark (although not at your set deadline)... Can we assume capital letters A-Z? Or do we have to allow for lowercase letters as well? If we just use caps, i can shorten the code some more{by UCASE()}... to 254..
Also, is it 3 PM EST or EDT? (daylight time)
Brian
|
Top
|
|
|
|
#66442 - 2002-06-10 09:01 PM
Re: KiXtart Golf Tournament Part III !!!
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
It's time.. where is the new topic? lol
Brian
|
Top
|
|
|
|
#66444 - 2002-06-10 09:11 PM
Re: KiXtart Golf Tournament Part III !!!
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Jens said he'd post a new topic... that we could post code on.. so i'm waiting for that.
Brian
|
Top
|
|
|
|
#66445 - 2002-06-10 09:21 PM
Re: KiXtart Golf Tournament Part III !!!
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Hmm. Jens.. are you ok, bud? Should we go ahead and post our solutions?
Brian
|
Top
|
|
|
|
#66446 - 2002-06-10 09:22 PM
Re: KiXtart Golf Tournament Part III !!!
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Wow! I was stuck in a corporate meeting and thought I missed all the action. thanks for waiting for me!
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 255 anonymous users online.
|
|
|