#68300 - 2002-07-20 11:35 PM
Re: New KiXtart Golf Challenge! (extended to Saturday, July 20, 6pm EST )
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Ok... scratch that... I'm actually down to.....
716
Can you squeak any more, Lonkero?
Brian
|
Top
|
|
|
|
#68301 - 2002-07-20 11:58 PM
Re: New KiXtart Golf Challenge! (extended to Saturday, July 20, 6pm EST )
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
It looks like time is up as of right now. My score is 716. I'm going to create a new topic and post my UDF..
Brian
|
Top
|
|
|
|
#68302 - 2002-07-22 10:00 AM
Re: New KiXtart Golf Challenge! (extended to Saturday, July 20, 6pm EST )
|
cj
MM club member
Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
|
Howard, What Erik says is true. Making a UDF of a long named command only gives you a benefit when you use the command more than 3 or so times.
eg:
code:
$=writeprofilestring("c:\filename", "section", "key", "value") $=writeprofilestring("c:\filename", "section", "key", "value") $=writeprofilestring("c:\filename", "section", "key", "value") $=writeprofilestring("c:\filename", "section", "key", "value")
scores 236
versus
code:
function a($section, $key, $value) $=writeprofilestring("c:\filename", $section, $key, $value) endfunction a("section", "key", "value") a("section", "key", "value") a("section", "key", "value") a("section", "key", "value")
scores 202
each line in the first program scores 59, so after 3 of them, the UDF becomes more economical.
Erik, it would be harder, but not impossible, to make a script to count. I wrote a script that converts KiX code to coloured HTML by doing a lookup of the valid KiX commands. It is too old to use now, but the principle is sound.
KiX uses space and CRLF as command separators, so using SPLIT with these 2 as delimiters makes parsing a KiX script relatively easy...
cj
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 373 anonymous users online.
|
|
|