more faults found in hoby's code.
it outputs to console.

anyway, if you accept it:
Function PxMRead($)
dim $h
open (1, $)
do
for each $ in split(join(split(split(READLINE(1),#)[0], )))
if $
$h=$h+" "+$
endif
next
until @error
close(1)
PxMDisplay(split($h))
EndFunction



makes -4
Function PxMDisplay($)
dim $a, $f, $w, $h, $y, $z

$a = CreateObject(Kixtart.Form)
;$a.ClientSize = $[2],$[3] ; Use this line for properly sized forms
$a.Size = 700,700 ;Comment out if using ClientSize above
$a.Show

$y = 5
$f = 255/$[4]
if $[1]=P1
$y = 4
$f = 255
endif

$z = $[1]=P3

for $h=1 to $[3]
for $w=1 to $[2]
$a.PSet($w, $h, $f*(65536*$[$y+2*$z]+256*$[$y+$z]+$[$y]))
$y = 1 + $y + 2*$z
next
next
sleep 10

;Uncomment the lines below to keep the form on the screen
;until closed manually.

;While $a.Visible
; $y=Execute($a.DoEvents)
;Loop
EndFunction

makes -6

total of -10
resulting in 462.

anyway, I don't like hoby's code being acceptable by the 2 reasons I just gave.
_________________________
!

download KiXnet