I hope jens clarifies that output issue.

if I don't use the output blocking and if I don't make my multilined string to work properly for real multilines my script ends up with:
KixGolf score = 687

code:
function ImportRegfile($)
if ubound($)<1 $=$,"" endif
for each $ in $
dim $k,$v,$m,$d,$s
open(1,$)
do
if "["=left($,1) $=substr($,2,len($)-2) if "-"=left($,1) $=delkey(substr($,2)) else $k=$ $=addkey($) endif endif
if $k&$ while \=right($,1) $=left($,len($)-1)+trim(readline(1)) loop
$v=substr($,2,instr($,"=")-3) $=split($,"=")[1]
if '"'=left($,1) $m="SZ" $s=substr($,2,len($)-2) else
$s=""
$m=instr($,":") $d=substr($,$m-2,1)
for each $ in split(substr($,$m+1),",")
$m=val("&"+$)
if $d="r" $=$m $m="DWORD" endif
if $d="e" $m="BINARY" endif
if $d=2|$d=7 $=chr($m) $m="EXPAND_SZ" endif
$s=$s+$
next
if $d=7 $m="MULTI_SZ" $s=$s+"|" endif
endif
if '-'=$s delvalue($k,$v) else writevalue($k,$v,$s,"reg_"+$m) endif
endif
$=readline(1)
until @error
close(1)
next
endfunction

with the output of:
quote:
C:\KiX2001.401\kixgolf>KIX32.EXE golf.kix
00000000000000-10000000000000000000000-10
The UDF ImportRegFile passed the validation test.
Please do not forget to post your KiXtart Golf score.

and it still does not produce the trash in reg [Big Grin]

cheers,
_________________________
!

download KiXnet