#101456 - 2003-05-30 01:42 PM
Re: KiXgolf: MOAN - Mother Of All Networks
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I have to go to work. It look's like I can't get much more out of this code now and will lack time at work. Good job Lonkero.
|
Top
|
|
|
|
#101457 - 2003-05-30 01:54 PM
Re: KiXgolf: MOAN - Mother Of All Networks
|
MightyR1
MM club member
Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
|
|
Top
|
|
|
|
#101460 - 2003-05-30 03:20 PM
Re: KiXgolf: MOAN - Mother Of All Networks
|
Sealeopard
KiX Master
Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
|
Okay, time for me to jump in and cite from the rules: quote: You are not allowed to use additional code that is external to the MOAN UDF. All code must be contained within the MOAN UDF.
Thus, the first example is valid while the second example is not valid as code outside the MOAN UDF is being calledcode:
;example 1 ;! function moan($a,$b,$c) ; doing my thing endfunction ;! ;!
code:
;example 2 ;! function moan($a,$b,$c) $a=externaludf($b) endfunction function externaludf($a) endfunction ;! ;!
However, COM calls to components that are part of a standard Windows installation are allowed. That is covered in the rules, too.
I'm glad to see that we finally have some competition going on
_________________________
There are two types of vessels, submarines and targets.
|
Top
|
|
|
|
#101463 - 2003-05-30 03:48 PM
Re: KiXgolf: MOAN - Mother Of All Networks
|
Sealeopard
KiX Master
Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
|
Got a new score:
code:
KiXtart Golf Score Tournament = KiXtart Golf: MOAN - Mother Of All Networks Processing Start = 2003/05/30 09:52:58.508 Processing End = 2003/05/30 09:52:58.678 Duration = 0000/00/00 00:00:00.169 # Loops = 1 KiXGolf Result = passed (13 out of 13 correct) KiXGolf Score = 1265 Thank you for participating in KiXtart Golf!
I've used my own updated .INI file which contaisn a couple of traps ;-) I've posted it below:code:
;WARNING: Some lines are broken for readability purposes. Please unbreak before using. [Test 1] IP=192.168.1.2 NetworkID=192.168.1.0 SubnetMask=255.255.255.0 Solution=1
[Test 2] IP=192.168.0.1 NetworkID=192.168.1.0 SubnetMask=255.255.255.0 Solution=0
[Test 3] IP=192.168.10.123 NetworkID=192.168.10.0 SubnetMask=255.255.255.192 Solution=0
[Test 4] IP= NetworkID=10.10.5.4 SubnetMask=255.255.255.252 Solution=10.10. 5. 5,10.10. 5. 6
[Test 5] IP=192.10.128.55 NetworkID= SubnetMask=27 Solution=192.10.128.32
[Test 6] IP= NetworkID=12.65.55.16 SubnetMask=28 Solution=12.65.55.17,12.65.55.18,12.65.55.19,12.65.55.20,12.65.55.21, 12.65.55.22,12.65.55.23,12.65.55.24,12.65.55.25,12.65.55.26, 12.65.55.27,12.65.55.28,12.65.55.29,12.65.55.30
[Test 7] IP=10.10.10.2 NetworkID= SubnetMask=255.255.255.254 Solution=
[Test 8] IP=10.10.10.2 NetworkID=10.10.10.0 SubnetMask= Solution=255.255.254.0,255.255.255.0,255.255.255.128,255.255.255.192, 255.255.255.224,255.255.255.240,255.255.255.248,255.255.255.252 SolutionAlternate=/23,/24,/25,/26,/27,/28,/29,/30
[Test 9] IP=192.168.99.55 NetworkID=192.168.99.55 SubnetMask= Solution=
[Test 10] IP=192.168.255.128 NetworkID=192.168.255.128 SubnetMask=255.255.255.128 Solution=1
[Test 11] IP=123.123.123.63 NetworkID=123.123.123.32 SubnetMask=27 Solution=1
[Test 12] IP=123.123.123.34 NetworkID=123.123.123.33 SubnetMask=31 Solution=
[Test 13] IP= NetworkID= SubnetMask= Solution=
_________________________
There are two types of vessels, submarines and targets.
|
Top
|
|
|
|
#101464 - 2003-05-30 03:54 PM
Re: KiXgolf: MOAN - Mother Of All Networks
|
Richard H.
Administrator
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
As there was a little confusion over the rules, I don't think this helper is out of order...
There is a way of getting around the requirement for having a single function without adding too much to your code, providing you don't need more than two parameters:
code:
Function Moan($a,$b,$c) Select Case $a="!1" ; Code from first external function Exit 0 Case $a="!2" ; Code from second external function Exit 0 EndSelect ... ; Normal MOAN code ; Call first "external" function $x=Moan("!1",$y,"") ; More Moan code ; Call second "external" function $u=Moan("!2",$v,$w) EndFunction
If you only have a single external function then a simple If/EndIf will suffice.
|
Top
|
|
|
|
#101468 - 2003-05-30 09:16 PM
Re: KiXgolf: MOAN - Mother Of All Networks
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 896 anonymous users online.
|
|
|