The original file:
code:
IF (@inwin = 1)
$NT_mode="yes"
ELSE
$NT_mode="no"
ENDIF
;
$memory=0
IF ($NT_mode = "yes")
;
;Physical Memory (K)
; Total: 64,948
; Available: 31,840
; File Cache: 14,652
;
IF (Exist("c:\temp\memory.txt") = 1)
del "c:\temp\"+@wksta.txt
ENDIF
cd "c:\temp"
shell "%comspec% /c winmsd /s /f" ; - /s = summary; /f = to file -
shell '%comspec% /c type '+@wksta.txt+' | find " Total:" >c:\temp\memory.txt'
;
IF (Open(9,"c:\temp\memory.txt") = 0)
WHILE (@error = 0)
$result=ReadLine(9)
$pos=INSTR(LCASE($result), "total:")
IF ($pos <> 0)
$memory=substr($result,$pos+6,len($result)-$pos-1)
ENDIF
LOOP
IF (CLOSE(9) <> 0)
ENDIF
ENDIF
ELSE
;
;Memory Type Total Used Free
;---------------- -------- -------- --------
;Conventional 640K 86K 554K
;Upper 0K 0K 0K
;Reserved 0K 0K 0K
;Extended (XMS) 65.472K ? 129.764K
;---------------- -------- -------- --------
;Total memory 66.112K ? 130.318K
;
IF (Exist("c:\temp\mem.txt") = 1)
del "c:\temp\mem.txt"
ENDIF
shell "%comspec% /c mem >c:\temp\mem.txt"
shell '%comspec% /c type c:\temp\mem.txt | find "Total memory" >c:\temp\memory.txt'
;
IF (Open(9,"c:\temp\memory.txt") = 0)
WHILE (@error = 0)
$result=ReadLine(9)
$pos=INSTR(LCASE($result), "total memory")
IF ($pos <> 0)
$memory=substr($result,41,len($result)-41)
ENDIF
LOOP
IF (CLOSE(9) <> 0)
ENDIF
ENDIF
ENDIF
IF (Exist("c:\temp\memory.txt") = 1)
del "c:\temp\"+@wksta.txt
ENDIF
IF (Exist("c:\temp\mem.txt") = 1)
del "c:\temp\mem.txt"
ENDIF
IF (Exist("c:\temp\memory.txt") = 1)
del "c:\temp\memory.txt"
ENDIF
;
? "Memory: "+$memory+" KBytes"
Output of kixstrip memory.kix memory.new (with warnings):
code:
;($begin)
;
; Kixtart 3.62
;
; (c) MCA - scripting@wanadoo.nl - 2000
;
; The software product is protected by copyright laws and
; international copyright treaties, as well as other in-
; tellectual property laws and treaties.
; The SOFTWARE PRODUCT is licensed, not sold.
;
; If you want to use the software for any (new) purpose
; you needs a license agreement, which can only be deli-
; vered by creator and owner of this software.
;
;($end)
if (@inwin=1) $nt_mode="yes" else $nt_mode="no" endif $memory=0 if ($nt_mode="yes") if (Exist("c:\temp\memory.txt")=1) del "c:\temp\"+@wksta.txt endif cd "c:\temp" shell "%comspec% /c winmsd /s /f" shell '%comspec% /c type '+@wksta.txt+' | find " Total:" >c:\temp\memory.txt' if (Open(9,"c:\temp\memory.txt")=0) while (@error=0) $result=ReadLine(9) $pos=INSTR(LCASE($result),"total:") if ($pos<>0) $memory=substr($result,$pos+6,len($result)-$pos-1) endif loop if (CLOSE(9)<>0) endif endif else if (Exist("c:\temp\mem.txt")=1) del "c:\temp\mem.txt" endif shell "%comspec% /c mem >c:\temp\mem.txt" shell '%comspec% /c type c:\temp\mem.txt | find "Total memory" >c:\temp\memory.txt' if (Open(9,"c:\temp\memory.txt")=0) while (@error=0) $result=ReadLine(9) $pos=INSTR(LCASE($result),"total memory") if ($pos<>0) $memory=substr($result,41,len($result)-41) endif loop if (CLOSE(9)<>0) endif endif endif if (Exist("c:\temp\memory.txt")=1) del "c:\temp\"+@wksta.txt endif if (Exist("c:\temp\mem.txt")=1) del "c:\temp\mem.txt" endif if (Exist("c:\temp\memory.txt")=1) del "c:\temp\memory.txt" endif
;($begin)
;
; tue 15-aug-2000 11:31:55
;
;Warning KIXSTRIP: some lines contains errors or possible errors.
; 3 line contains unknown function.
;Informative KIXSTRIP: 15 block_structures found.
;Informative KIXSTRIP: no labels found.
;Summary KIXSTRIP: CALL EXIT GOSUB GOTO QUIT RETURN RUN SHELL USE
;Informative KIXSTRIP: 4 SHELL
;
;($end)
;($begin)
;
;Warning KIXSTRIP: 16 "@wksta.txt", 20 "@wksta.txt", 63 "@wksta.txt" line contains unknown function.
;
;($end)
code:
Kixstrip 3.62 (vs 1.70e) (c) MCA - scripting@wanadoo.nl - 2000 1 ....E(72)
Warning KIXSTRIP: 16 "@wksta.txt", 20 "@wksta.txt", 63 "@wksta.txt" line contains unknown function.
Kixstrip 3.62 (vs 1.70e) 0.61 (sec)
input 72 memory.kix
output 51 memory.new
-skip- 21
-blocks- 0
-labels- 0
Warning KIXSTRIP: 3 lines contain unknown function.
options:
/Combine /Headers /NoBlock_Check /NoDebug /NoPrint /NoShow_Errors /NoTAB /NoTranslate
/License: MCA - scripting@wanadoo.nl - 2000
Output of kixstrip memory.kix memory.new /block_check /debug (with warnings):
code:
?"- 1-" $nt_mode="' ; <- warning 1-> '"
?"- 2-" IF (@inwin = 1) $NT_mode="yes"
ELSE
$nt_mode="no"
ENDIF
?"- 3-" ENDIF
; <- warning 2 ->
; -------> Warning KIXSTRIP: 3 block "if/else/endif" incompleted. starting point of block structure missing.
; -------> Warning KIXSTRIP: 3 block incompleted.
?"- 4-" IF (@inwin = 1) $NT_mode="yes"
ELSE
$nt_mode="no"
ENDIF
?"- 5-" IF(@inwin = 1)$NT_mode="yes"
ELSE
$NT_mode="no"
ENDIF
?"- 6-"
?"- 7-" ;
?"- 8-" $memory=0
?"- 9-" IF ($nt_mode = "yes")) ; <- warning 3 ->
; -------> Warning KIXSTRIP: 9 line incomplete "right parenthesis".
; -------> Warning KIXSTRIP: 9 line incompleted.
?"- 10-" ;
?"- 11-" ;Physical Memory (K)
?"- 12-" ; Total: 64,948
?"- 13-" ; Available: 31,840
?"- 14-" ; File Cache: 14,652
?"- 15-" ;
?"- 16-" IF (Exist("c:\temp\memory.txt") = 1)
?"- 17-" DEL "c:\temp\"+@wksta.txt
; -------> Warning KIXSTRIP: 17 line contains unknown function.
?"- 18-" ENDIF
?"- 19-" CD "c:\temp"
?"- 20-" SHELL "%comspec% /c winmsd /s /f" ; - /s = summary; /f = to file -
?"- 21-" SHELL '%comspec% /c type '+@wksta.txt+' | find " Total:" >c:\temp\memory.txt'
; -------> Warning KIXSTRIP: 21 line contains unknown function.
?"- 22-" ;
?"- 23-" IF (Open(9,"c:\temp\memory.txt") = 0)
?"- 24-" WHILE (@error = 0)
?"- 25-" $result=ReadLine(9)
?"- 26-" $pos=INSTR(LCASE($result), "total:")
?"- 27-" IF ($pos <> 0)
?"- 28-" $memory=substr($result,$pos+6,len($result)-$pos-1)
?"- 29-" ENDIF
?"- 30-" LOOP
?"- 31-" IF (CLOSE(9) <> 0)
?"- 32-" ENDIF
?"- 33-" ENDIF
?"- 34-" ELSE
?"- 35-" ;
?"- 36-" ;Memory Type Total Used Free
?"- 37-" ;---------------- -------- -------- --------
?"- 38-" ;Conventional 640K 86K 554K
?"- 39-" ;Upper 0K 0K 0K
?"- 40-" ;Reserved 0K 0K 0K
?"- 41-" ;Extended (XMS) 65.472K ? 129.764K
?"- 42-" ;---------------- -------- -------- --------
?"- 43-" ;Total memory 66.112K ? 130.318K
?"- 44-" ;
?"- 45-" IF (Exist("c:\temp\mem.txt") = 1)
?"- 46-" DEL "c:\temp\mem.txt"
?"- 47-" ENDIF
?"- 48-" SHELL "%comspec% /c mem >c:\temp\mem.txt"
?"- 49-" SHELL '%comspec% /c type c:\temp\mem.txt | find "Total memory" >c:\temp\memory.txt'
?"- 50-" ;
?"- 51-" IF (Open(9,"c:\temp\memory.txt") = 0)
?"- 52-" WHILE (@error = 0)
?"- 53-" $result=ReadLine(9)
?"- 54-" $pos=INSTR(LCASE($result), "total memory")
?"- 55-" IF ($pos <> 0)
?"- 56-" $memory=substr($result,41,len($result)-41)
?"- 57-" ENDIF
?"- 58-" LOOP
?"- 59-" IF (CLOSE(9) <> 0)
?"- 60-" ENDIF
?"- 61-" ENDIF
?"- 62-" ENDIF
?"- 63-" IF (Exist("c:\temp\memory.txt") = 1)
?"- 64-" DEL "c:\temp\"+@wksta.txt
; -------> Warning KIXSTRIP: 64 line contains unknown function.
?"- 65-" ENDIF
?"- 66-" IF (Exist("c:\temp\mem.txt") = 1)
?"- 67-" DEL "c:\temp\mem.txt"
?"- 68-" ENDIF
?"- 69-" IF (Exist("c:\temp\memory.txt") = 1)
?"- 70-" DEL "c:\temp\memory.txt"
?"- 71-" ENDIF
?"- 72-" ;
?"- 73-" ? "Memory: "+$memory+" KBytes";($begin)
;
; tue 15-aug-2000 09:35:30
;
;Warning KIXSTRIP: 1 block is incompleted.
; missing "do/until", "if/else/endif", "while/loop"
; "select/case/endselect" statement.
; - do/until [0:0]
; - if/else/endif [15:4:16]
; - select/case/endselect [0:0:0]
; - while/loop [2:2]
;Warning KIXSTRIP: 1 line is incompleted.
;Warning KIXSTRIP: some lines contains errors or possible errors.
; 1 line incomplete "right parenthesis".
; 1 block "if/else/endif" incompleted. starting point of block structure missing.
; 1 block incompleted.
; 1 line incompleted.
; 3 line contains unknown function.
;Informative KIXSTRIP: 17 block_structures found.
;Informative KIXSTRIP: no labels found.
;Summary KIXSTRIP: CALL EXIT GOSUB GOTO QUIT RETURN RUN SHELL USE
;Informative KIXSTRIP: 4 SHELL
;
;($end)
;($begin)
;
;Warning KIXSTRIP: 9 line incomplete "right parenthesis".
;Warning KIXSTRIP: 3 block "if/else/endif" incompleted. starting point of block structure missing.
;Warning KIXSTRIP: 3 block incompleted.
;Warning KIXSTRIP: 9 line incompleted.
;Warning KIXSTRIP: 17 "@wksta.txt", 21 "@wksta.txt", 64 "@wksta.txt" line contains unknown function.
;
;($end)
code:
Kixstrip 3.62 (vs 1.70e) (c) MCA - scripting@wanadoo.nl - 2000 1 ....E(72)
Warning KIXSTRIP: 16 "@wksta.txt", 20 "@wksta.txt", 63 "@wksta.txt" line contains unknown function.
Kixstrip 3.62 (vs 1.70e) 0.66 (sec)
input 72 memory.kix
output 51 memory.new
-skip- 21
-blocks- 0
-labels- 0
Warning KIXSTRIP: 3 lines contain unknown function.
options:
/Combine /Headers /NoBlock_Check /NoDebug /NoPrint /NoShow_Errors /NoTAB /NoTranslate
/License: MCA - scripting@wanadoo.nl - 2000
Output of kixstrip memory.new memory.kix /block_check /debug /headers (without warnings):
code:
;($begin)
;
; Kixtart 3.62
;
; (c) MCA - scripting@wanadoo.nl - 2000
;
; The software product is protected by copyright laws and
; international copyright treaties, as well as other in-
; tellectual property laws and treaties.
; The SOFTWARE PRODUCT is licensed, not sold.
;
; If you want to use the software for any (new) purpose
; you needs a license agreement, which can only be deli-
; vered by creator and owner of this software.
;
;($end)
if (@inwin=1) $nt_mode="yes" else $nt_mode="no" endif $memory=0 if ($nt_mode="yes") if (Exist("c:\temp\memory.txt")=1) del "c:\temp\"+@wksta+".txt" endif cd "c:\temp" shell "%comspec% /c winmsd /s /f" shell '%comspec% /c type '+@wksta+'.txt | find " Total:" >c:\temp\memory.txt' if (Open(9,"c:\temp\memory.txt")=0) while (@error=0) $result=ReadLine(9) $pos=INSTR(LCASE($result),"total:") if ($pos<>0) $memory=substr($result,$pos+6,len($result)-$pos-1) endif loop if (CLOSE(9)<>0) endif endif else if (Exist("c:\temp\mem.txt")=1) del "c:\temp\mem.txt" endif shell "%comspec% /c mem >c:\temp\mem.txt" shell '%comspec% /c type c:\temp\mem.txt | find "Total memory" >c:\temp\memory.txt' if (Open(9,"c:\temp\memory.txt")=0) while (@error=0) $result=ReadLine(9) $pos=INSTR(LCASE($result),"total memory") if ($pos<>0) $memory=substr($result,41,len($result)-41) endif loop if (CLOSE(9)<>0) endif endif endif if (Exist("c:\temp\memory.txt")=1) del "c:\temp\"+@wksta+".txt" endif if (Exist("c:\temp\mem.txt")=1) del "c:\temp\mem.txt" endif if (Exist("c:\temp\memory.txt")=1) del "c:\temp\memory.txt" endif
;($begin)
;
; tue 15-aug-2000 11:38:05
;
;Informative KIXSTRIP: no errors found.
;
;Informative KIXSTRIP: 15 block_structures found.
;Informative KIXSTRIP: no labels found.
;Summary KIXSTRIP: CALL EXIT GOSUB GOTO QUIT RETURN RUN SHELL USE
;Informative KIXSTRIP: 4 SHELL
;
;($end)
code:
Kixstrip 3.62 (vs 1.70e) (c) MCA - scripting@wanadoo.nl - 2000 1 ....E(72)
Kixstrip 3.62 (vs 1.70e) 0.60 (sec)
input 72 mem3
output 51 mem3d
-skip- 21
-blocks- 0
-labels- 0
Informative KIXSTRIP: no errors found.
options:
/Combine /Headers /NoBlock_Check /NoDebug /NoPrint /NoShow_Errors /NoTAB /NoTranslate
/License: MCA - scripting@wanadoo.nl - 2000