; begin Printer Queue ; ;! Function a($,$p) dim $l $l=9 while ~$p if instr($,$l) $p=$p-1 if $l>$ if 0>$p $p=($^)/2 endif $=$+!+1*$ else $a=$a+1 endif $=substr($,3) else $l=$l-1 EndFunction ;! ;! ; end Printer Queue
Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
well... here's my 136... after the closing of the private round...
Jooel just pointed out to me that $c = val($) (for the first numeric val) can also be written as $c = 0 + $, this change gives a 136 instead of a 139...
Yep, I'm a bit sad...
Code:
; begin Printer Queue
;
;!
Function a($,$p)
Dim $c, $i
While ~$p
$a = $a +($c<>X)
$p = $p - 1
$c = 0+$
$ = substr($,3)
For each $i in split($)
If $c<$i
$ = $ + ' ' + $c
$c = X
if $p < 0
$p = ($^) / 2
EndFunction
;!
;!
; end Printer Queue
Jooel, you've got some really sick code. So sick in fact, that when I tried to change something, this really unusual sound started coming out of my tower. I swear I think it is the processor. Hit ctrl c and it quits. No lie.
allen, here is 154 of your code. that means, I've shortened everyones code and clock is 3AM. guys, it's your turn
Code:
function a($,$p)
dim $i
for $i=9 to 1 step -1
while instr($,$i) | $p=0 & $i=split($)[$p]
$p=iif($p=0,($^)/2,$p-1)
$a=$a+1*$/$i
$=right($,-2) + iif($i>$," " + 1*$,"")
endfunction