Page 4 of 9 « First<23456>Last »
Topic Options
#178226 - 2007-07-23 05:00 PM Re: KiXgolf Freebie: Quicksum [Re: Allen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
woot

how did you squeeze out 2(3) more strokes ???
_________________________



Top
#178227 - 2007-07-23 05:09 PM Re: KiXgolf Freebie: Quicksum [Re: Allen]
acmp Offline
Getting the hang of it

Registered: 2004-07-02
Posts: 69
Loc: Bingham, Nottinghamshire, Engl...
Now I have good code I'm not too keen to post either.

I removed my () from the math's bit as they were unnecessary. Then the light bulb went on and I shaved another 3 chars.
_________________________
Every day is a school day

Top
#178228 - 2007-07-23 05:14 PM Re: KiXgolf Freebie: Quicksum [Re: acmp]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
83 sounds weird.

need to do some testing. my split(join()) udf will never get there though... it's totally stuck at 85
_________________________
!

download KiXnet

Top
#178229 - 2007-07-23 05:17 PM Re: KiXgolf Freebie: Quicksum [Re: Lonkero]
acmp Offline
Getting the hang of it

Registered: 2004-07-02
Posts: 69
Loc: Bingham, Nottinghamshire, Engl...
Here we go...


Your solution passed all tests

KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_qs.kix

Computer
OS = Windows XP Professional
CPU = Intel(R) Pentium(R) 4 CPU 3.00GHz
Speed = 2992 MHz
Memory = 1022 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Quicksum
Processing Start = 2007/07/23 16:16:49.784
Processing End = 2007/07/23 16:16:49.799
Duration = 0000/00/00 00:00:00.014
KiXGolf Score = 81
_________________________
Every day is a school day

Top
#178230 - 2007-07-23 05:19 PM Re: KiXgolf Freebie: Quicksum [Re: acmp]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Using
Function a($b)
is no cheat
See rule 12

Top
#178231 - 2007-07-23 05:21 PM Re: KiXgolf Freebie: Quicksum [Re: Witto]
acmp Offline
Getting the hang of it

Registered: 2004-07-02
Posts: 69
Loc: Bingham, Nottinghamshire, Engl...
yep, just checked and updated. I'm getting into this.
_________________________
Every day is a school day

Top
#178232 - 2007-07-23 05:21 PM Re: KiXgolf Freebie: Quicksum [Re: acmp]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
also score 85
 Code:
Function a($b)
	Dim $, $c
	For $ = 0 to Len($b)
		$c = Asc(SubStr($b,$))-64
		$a = $a + $c * $ * ($c>)
EndFunction

Top
#178233 - 2007-07-23 05:26 PM Re: KiXgolf Freebie: Quicksum [Re: Witto]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Yep.

had this as well included into mine ...
_________________________



Top
#178234 - 2007-07-23 05:29 PM Re: KiXgolf Freebie: Quicksum [Re: acmp]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
This is a complete different approach, isn't it ?
_________________________



Top
#178235 - 2007-07-23 05:36 PM Re: KiXgolf Freebie: Quicksum [Re: Jochen]
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
$a = 1
? "vartype = " + vartype(cint($a))
? "vartype = " + vartypename(cint($a))

$a = int($a)
? "vartype = " + vartype($a)
? "vartype = " + vartypename($a)


Produces a Long (vartype=3). Is this a Kix4.52 bug?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#178236 - 2007-07-23 05:58 PM Re: KiXgolf Freebie: Quicksum [Re: Howard Bullock]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
Sadly, I've got to do some real work \:\(

With the variable mod my score is 82. Catch you guys later tonight.

Top
#178238 - 2007-07-23 06:59 PM Re: KiXgolf Freebie: Quicksum [Re: Allen]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
ok, i can't let you guys have all the fun (83):

Running Test 1...Done
Running Test 2...Done
Running Test 3...Done
Running Test 4...Done
Running Test 5...Done
Running Test 6...Done
Your solution passed all tests

KiXtart
KiXtart Version = 4.51
KiXGolf Script = kixgolf_qs.kix

Computer
OS = Windows XP Professional
CPU = Intel(R) Pentium(R) D CPU 3.20GHz
Speed = 3200 MHz
Memory = 2048 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Quicksum
Processing Start = 2007/07/23 11:58:05.262
Processing End = 2007/07/23 11:58:05.277
Duration = 0000/00/00 00:00:00.014
KiXGolf Score = 83

Thank you for participating in KiXtart Golf!
Press any key to continue...
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#178239 - 2007-07-23 07:07 PM Re: KiXgolf Freebie: Quicksum [Re: Benny69]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
and yes a different, but not completely different approach
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#178240 - 2007-07-23 08:37 PM Re: KiXgolf Freebie: Quicksum [Re: Benny69]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Running Test 1...Done
Running Test 2...Done
Running Test 3...Done
Running Test 4...Done
Running Test 5...Done
Running Test 6...Done
Your solution passed all tests

KiXtart
KiXtart Version = 4.53
KiXGolf Script = KIXGOL~1.KIX

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 15
Speed = 2400 MHz
Memory = 2048 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Quicksum
Processing Start = 2007/07/23 20:47:28.656
Processing End = 2007/07/23 20:47:28.656
Duration = 0000/00/00 00:00:00.000
KiXGolf Score = 81

Thank you for participating in KiXtart Golf!
_________________________



Top
#178241 - 2007-07-23 08:44 PM Re: KiXgolf Freebie: Quicksum [Re: Jochen]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
you dawg!
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#178242 - 2007-07-23 08:48 PM Re: KiXgolf Freebie: Quicksum [Re: Benny69]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
hehe ... updated above with a better runtime (did some processor intensive stuff during last run)
_________________________



Top
#178243 - 2007-07-23 09:04 PM Re: KiXgolf Freebie: Quicksum [Re: Howard Bullock]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
don't think it's a bug as it was reported years ago...
can't remember the answers or anything but remember playing with it.
kix has never (at least not in kix2001 nor in kix2010) had vartype 2.
_________________________
!

download KiXnet

Top
#178244 - 2007-07-23 09:10 PM Re: KiXgolf Freebie: Quicksum [Re: Lonkero]
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
It seems very strange to have a CINT function that does not create an integer.
 Quote:
CINT
Action
Returns an expression that has been converted to a Variant of subtype Integer.

Syntax
CINT (expression)

Parameter
Expression
Any valid expression.

Returns
Variant of subtype Integer.

Remarks
CInt differs from the Fix and Int functions, which truncate, rather than round, the fractional part of a number. When the fractional part is exactly 0.5, the CInt function always rounds it to the nearest even number. For example, 0.5 rounds to 0, and 1.5 rounds to 2.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#178245 - 2007-07-23 09:14 PM Re: KiXgolf Freebie: Quicksum [Re: Howard Bullock]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
ok here is my 83:

 Code:
;!
Function a($)

	dim $b
	if $
		$b=asc(right($,1))-64
		$a=a(left($,~))+len($)*$b*($b>)

EndFunction
;!
;!
; end Quicksum
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#178246 - 2007-07-23 09:24 PM Re: KiXgolf Freebie: Quicksum [Re: Benny69]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
Your solution passed all tests

KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_qs.KIX

Computer
OS = Windows Vista Business Edition
CPU = AMD Athlon(tm) 64 X2 Dual Core Processor 5000+
Speed = 2604 MHz
Memory = 2048 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Quicksum
Processing Start = 2007/07/23 15:22:21.179
Processing End = 2007/07/23 15:22:21.194
Duration = 0000/00/00 00:00:00.015
KiXGolf Score = 82

and 81 with variable mod.

Top
Page 4 of 9 « First<23456>Last »


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

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.281 seconds in which 0.235 seconds were spent on a total of 13 queries. Zlib compression enabled.

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