Dear,

Two new versions of kixstrip has been created.


  • kixstrip.exe 2.02 = latest update for kixtart 3.63.
    calling kixstrip363.exe
  • kixstrip.exe 2.12 = update for kixtart 4.00 beta1.
    calling kixstrip400.exe

Programs situated at site http://home.wanadoo.nl/scripting

The only change in first version 2.02 is an enhancement in collecting error information.
This version isn't upwards compatible with kixtart 4.00 version.

The latest version 2.12 gets a great list of changes:


  • add: upgrade to kixtart 4.00 beta 1. downwards compatible.
  • add: introduction of option /Show_Structure or /SS, which shows always block structure
    information.
  • add: enhancement of error information by block structures.
  • add: redesign of output screen (specially for block structures + functions).
  • add: number of counters has been increased (special counters: OLExxx which is not longer
    supported at version 4.00 & then which is an illegal statement).

Different kind of examples shows you the changes:

code:

IF (1=1)
? "if true"
ELSE
? "if false"
ENDIF

WHILE (1=1)
? "while ok"
LOOP

DO
? "do ok"
UNTIL (1=1)

SELECT
CASE (1=1)
ENDSELECT

FUNCTION x
? "function"
ENDFUNCTION

FOR EACH $x IN $xx
? $xx[$x]
NEXT

FOR $x=1 TO 100 STEP 2
? "for to"
NEXT

$result=get_kix_version()
? "show kix version "+$result
exit

function get_kix_version($dummy)
$get_kix_version=@kix
endfunction


Output of running kixstrip with option /Show_Structure:

code:

;($begin)
;
; Kixtart 4.00
;
; (c) MCA - scripting@wanadoo.nl - 2000, 2001
;
; 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 (1=1) else endif while (1=1) loop do until (1=1) select case (1=1) endselect function x endfunction for each $x in $xx next for $x=1 to 100 step 2 next $result=get_kix_version() exit function get_kix_version($dummy) $get_kix_version=@kix endfunction
;($begin)
;
; tue 10-apr-2001 01:33:58 (kix 4.00 vs 2.12e)
;
;Informative KIXSTRIP: no errors found.
;
;Summary KIXSTRIP: block structures
; - do:until [1:1]
; - for|each:in|to:step|next [2|1:1|1:1|2]
; - function:endfunction [2:2]
; - if:else:endif [1:1:1]
; - select:case:endselect [1:1:1]
; - while:loop [1:1]
;Informative KIXSTRIP: 8 block_structures found.
;Informative KIXSTRIP: 2 functions found.
;Informative KIXSTRIP: no labels found.
;Summary KIXSTRIP: BREAK CALL DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE
;Informative KIXSTRIP: 2 ENDFUNCTION
;Informative KIXSTRIP: 1 EXIT
;Informative KIXSTRIP: 2 FUNCTION
;
;($end)

Screen output of running kixstrip with option /Show_Structure:

code:

Kixstrip 4.00 (vs 2.12e) (c) MCA - scripting@wanadoo.nl - 2000, 2001

1 ..E(38)


Kixstrip 4.00 (vs 2.12e) 0.16 (sec)

input 38 example1.kix
output 21 example1.out (skip: 17 blocks: 0 labels: 0)

Summary KIXSTRIP: block structures
- do:until [1:1]
- for|each:in|to:step|next [2|1:1|1:1|2]
- function:endfunction [2:2]
- if:else:endif [1:1:1]
- select:case:endselect [1:1:1]
- while:loop [1:1]
8 block_structures found.
Warning KIXSTRIP: 2 functions found.
Informative KIXSTRIP: no errors found.

active options:
/Combine /Headers /Show_Structure
/License: MCA - scripting@wanadoo.nl - 2000, 2001
inactive options:
/NoBlock_Check /NoDebug /NoPerformance /NoPrint /NoProgress /NoShow_Errors /NoTAB /NoTranslate


Screen output of running kixstrip without option /Show_Structure:

code:

Kixstrip 4.00 (vs 2.12e) (c) MCA - scripting@wanadoo.nl - 2000, 2001

1 ..E(38)

Kixstrip 4.00 (vs 2.12e) 0.17 (sec)

input 38 example1.kix
output 21 example1.out (skip: 17 blocks: 0 labels: 0)

Informative KIXSTRIP: no errors found.

active options:
/Combine /Headers
/License: MCA - scripting@wanadoo.nl - 2000, 2001
inactive options:
/NoBlock_Check /NoDebug /NoPerformance /NoPrint /NoProgress /NoShow_Errors /NoShow_Structure /NoTAB /NoTranslate


Another example which contains block structures and other elements:

code:

do ? "do" until (1=1) ? "end.do"

$xx='aa','bb' for each $x in $xx ? $x next ? "end.for.each.in"

for $i=1 to 10 step 2 ? $i next ? "end.for.to.step"

function XXX () ? @date endfunction ? "end.function"

if (1=1) and (2=2) or (3=3) ? "true" else "false" endif ? "end.if"

select case (1=1) ? "1=1" case (2=2) ? "2=2" endselect ? "end.select"

while (1=1) ? "while" loop ? "end.while"

; some examples

" counters are: "
BREAK CALL DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION
GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL
SLEEP THEN USE

" unknown function is:"
@unknown_macro

" missing elements: "
? "dit is een test
? 'dit is een test
until (1=1)
next
endfunction
endif
endselect
loop

" OLExxx functions: "
OleCallFunc
OleCallProc
OleCreateObject
OleEnumObject
OleGetObject
OleGetProperty
OleGetSubObject
OlePutProperty
OleReleaseObject

CreateObject
GetObject


Output of running kixstrip.exe with options /block_check /show_errors:

code:

DO ? "do"
UNTIL (1=1) ? "end.do"
$xx='aa','bb'
FOR EACH $x IN $xx ? $x
NEXT
? "end.for.each.in"
FOR $i=1 TO 10 STEP 2 ? $i
NEXT
? "end.for.to.step"
FUNCTION XXX () ? @date
ENDFUNCTION
? "end.function"
IF (1=1) AND (2=2) OR (3=3) ? "true"
ELSE
"false"
ENDIF
? "end.if"
SELECT
CASE
(1=1) ? "1=1"
CASE
(2=2) ? "2=2"
ENDSELECT
? "end.select"
WHILE (1=1) ? "while"
LOOP
? "end.while"

; some examples

" counters are: "
BREAK
CALL
DISPLAY
ENDFUNCTION
EXECUTE
EXIT
FUNCTION
; -------> Warning KIXSTRIP: 18 block "function/endfunction" incompleted. starting point of block structure missing.
; -------> Warning KIXSTRIP: 18 block incompleted.
GET
GETS
GOSUB
GOTO OLExxx
PLAY
QUIT
RETURN
RUN
SHELL
SLEEP THEN
USE

" unknown function is:"
@unknown_macro
; -------> Warning KIXSTRIP: 23 line contains unknown function.

" missing elements: "
? "dit is een test
; -------> Warning KIXSTRIP: 26 line incomplete "double quotation".
; -------> Warning KIXSTRIP: 26 line incompleted.
? 'dit is een test
; -------> Warning KIXSTRIP: 27 line incomplete "single quotation".
; -------> Warning KIXSTRIP: 27 line incompleted.
UNTIL (1=1)
NEXT
; -------> Warning KIXSTRIP: 29 block "for/.../next" incompleted. starting point of block structure missing.
; -------> Warning KIXSTRIP: 29 block incompleted.
ENDFUNCTION
; -------> Warning KIXSTRIP: 30 block "function/endfunction" incompleted. starting point of block structure missing.
; -------> Warning KIXSTRIP: 30 block incompleted.
ENDIF
; -------> Warning KIXSTRIP: 31 block "if/else/endif" incompleted. starting point of block structure missing.
; -------> Warning KIXSTRIP: 31 block incompleted.
ENDSELECT
; -------> Warning KIXSTRIP: 32 block "select/case/endselect" incompleted. starting point of block structure missing.
; -------> Warning KIXSTRIP: 32 block incompleted.
LOOP
; -------> Warning KIXSTRIP: 33 block "while/loop" incompleted. starting point of block structure missing.
; -------> Warning KIXSTRIP: 33 block incompleted.

" OLExxx functions: "
OleCallFunc
OleCallProc
OleCreateObject
OleEnumObject
OleGetObject
OleGetProperty
OleGetSubObject
OlePutProperty
OleReleaseObject

CreateObject
GetObject

;($begin)
;
; tue 10-apr-2001 01:46:18 (kix 4.00 vs 2.12e)
;
;Warning KIXSTRIP: 6 blocks are incompleted. missing statement(s).
; -ERROR- - do:until [1:2]
; -ERROR- - for|each:in|to:step|next [2|1:1|1:1|3]
; -ERROR- - function:endfunction [2:3]
; -ERROR- - if:else:endif [1:1:2]
; -ERROR- - select:case:endselect [1:2:2]
; -ERROR- - while:loop [1:2]
;Warning KIXSTRIP: 2 lines are incompleted.
;Warning KIXSTRIP: found illegal statement THEN.
;Warning KIXSTRIP: some lines contains errors or possible errors.
; 1 line incomplete "single quotation".
; 1 line incomplete "double quotation".
; 1 block "for/.../next" incompleted. starting point of block structure missing.
; 2 block "function/endfunction" incompleted. starting point of block structure missing.
; 1 block "if/else/endif" incompleted. starting point of block structure missing.
; 1 block "select/case/endselect" incompleted. starting point of block structure missing.
; 1 block "while/loop" incompleted. starting point of block structure missing.
; 6 block incompleted.
; 2 line incompleted.
; 1 line contains unknown function.
;Informative KIXSTRIP: 8 block_structures found.
;Informative KIXSTRIP: 2 functions found.
;Informative KIXSTRIP: no labels found.
;Summary KIXSTRIP: BREAK CALL DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE
;Informative KIXSTRIP: 1 BREAK
;Informative KIXSTRIP: 1 CALL
;Informative KIXSTRIP: 1 DISPLAY
;Informative KIXSTRIP: 3 ENDFUNCTION
;Informative KIXSTRIP: 1 EXECUTE
;Informative KIXSTRIP: 1 EXIT
;Informative KIXSTRIP: 2 FUNCTION
;Informative KIXSTRIP: 1 GET
;Informative KIXSTRIP: 1 GETS
;Informative KIXSTRIP: 1 GOSUB
;Informative KIXSTRIP: 1 GOTO
;Warning KIXSTRIP: 10 OLExxx (no longer supported at vs 4.00)
;Informative KIXSTRIP: 1 PLAY
;Informative KIXSTRIP: 1 QUIT
;Informative KIXSTRIP: 1 RETURN
;Informative KIXSTRIP: 1 RUN
;Informative KIXSTRIP: 1 SHELL
;Informative KIXSTRIP: 1 SLEEP
;Warning KIXSTRIP: 1 THEN (illegal statement)
;Informative KIXSTRIP: 1 USE
;
;($end)
;($begin)
;
;Warning KIXSTRIP: 27 line incomplete "single quotation".
;Warning KIXSTRIP: 26 line incomplete "double quotation".
;Warning KIXSTRIP: 29 block "for/.../next" incompleted. starting point of block structure missing.
;Warning KIXSTRIP: 18, 30 block "function/endfunction" incompleted. starting point of block structure missing.
;Warning KIXSTRIP: 31 block "if/else/endif" incompleted. starting point of block structure missing.
;Warning KIXSTRIP: 32 block "select/case/endselect" incompleted. starting point of block structure missing.
;Warning KIXSTRIP: 33 block "while/loop" incompleted. starting point of block structure missing.
;Warning KIXSTRIP: 18, 29, 30, 31, 32, 33 block incompleted.
;Warning KIXSTRIP: 26, 27 line incompleted.
;Warning KIXSTRIP: 23 "@unknown_macro" line contains unknown function.
;
;($end)


Screen output of running kixstrip.exe with options /block_check /show_errors:

code:

Kixstrip 4.00 (vs 2.12e) (c) MCA - scripting@wanadoo.nl - 2000, 2001

1 ...E(49)

Warning KIXSTRIP: 27 line incomplete "single quotation".
Warning KIXSTRIP: 26 line incomplete "double quotation".
Warning KIXSTRIP: 29 block "for/.../next" incompleted. starting point of block structure missing.
Warning KIXSTRIP: 18, 30 block "function/endfunction" incompleted. starting point of block structure missing.
Warning KIXSTRIP: 31 block "if/else/endif" incompleted. starting point of block structure missing.
Warning KIXSTRIP: 32 block "select/case/endselect" incompleted. starting point of block structure missing.
Warning KIXSTRIP: 33 block "while/loop" incompleted. starting point of block structure missing.
Warning KIXSTRIP: 18, 29, 30, 31, 32, 33 block incompleted.
Warning KIXSTRIP: 26, 27 line incompleted.
Warning KIXSTRIP: 23 "@unknown_macro" line contains unknown function.

Kixstrip 4.00 (vs 2.12e) 0.22 (sec)

input 49 example2.kix
output 49 example2.out (skip: 0 blocks: 0 labels: 0)
block_check -ERROR- block_errors=6
block_structures=8 functions=2 labels=0
tab=6 (default)

Warning KIXSTRIP: 6 blocks are incompleted. missing statement(s).
-ERROR- - do:until [1:2]
-ERROR- - for|each:in|to:step|next [2|1:1|1:1|3]
-ERROR- - function:endfunction [2:3]
-ERROR- - if:else:endif [1:1:2]
-ERROR- - select:case:endselect [1:2:2]
-ERROR- - while:loop [1:2]
8 block_structures found.
Warning KIXSTRIP: 2 functions found.
Warning KIXSTRIP: 2 lines are incompleted.
Warning KIXSTRIP: 1 line contains unknown function.
Warning KIXSTRIP: found illegal statement THEN.

active options:
/Block_Check /Headers /Print /Show_Errors /TAB=6 /Translate
inactive options:
/NoCombine /NoDebug /NoPerformance /NoProgress /NoShow_Structure
/NoLicense: (not.specified)


Latest example is a function created by Shawn:

code:

break on

; sort some strings...

$array = Peach,Pumpkin,Orange,Grape,Lime,Apple,Rasberry,Cherry,Lemon
$array = bubbleup($array)
for each $element in $array
? $element
next

; sort some integers...

$array = 109,75,200,25,38,19,150,11,20
$array = bubbleup($array)
for each $element in $array
? $element
next

exit

;============================================
; Bubble sort argv(0)...argv(n) increasing...
;============================================

function bubbleup($argv)
;
if ubound($argv)
$i=0
while $i < ubound($argv)
$m = $argv[$i]
$j = $i + 1
while $j < ubound($argv)+1
if $argv[$j] < $m
$m = $argv[$j]
$argv[$j] = $argv[$i]
$argv[$i] = $m
endif
$j=$j+1
loop
$i=$i+1
loop
endif
$bubbleup = $argv
;
endfunction


Output of running kixstrip.exe with options /block_check /show_errors:

code:

BREAK on

; sort some strings...

$array = Peach,Pumpkin,Orange,Grape,Lime,Apple,Rasberry,Cherry,Lemon
$array = bubbleup($array)
FOR EACH $element IN $array
? $element
NEXT

; sort some integers...

$array = 109,75,200,25,38,19,150,11,20
$array = bubbleup($array)
FOR EACH $element IN $array
? $element
NEXT

EXIT

;============================================
; Bubble sort argv(0)...argv(n) increasing...
;============================================

FUNCTION bubbleup($argv)
;
IF ubound($argv)
$i=0
WHILE $i < ubound($argv)
$m = $argv[$i]
$j = $i + 1
WHILE $j < ubound($argv)+1
IF $argv[$j] < $m
$m = $argv[$j]
$argv[$j] = $argv[$i]
$argv[$i] = $m
ENDIF
$j=$j+1
LOOP
$i=$i+1
LOOP
ENDIF
$bubbleup = $argv
;
ENDFUNCTION

;($begin)
;
; tue 10-apr-2001 01:49:15 (kix 4.00 vs 2.12e)
;
;Informative KIXSTRIP: no errors found.
;
;Informative KIXSTRIP: 7 block_structures found.
;Informative KIXSTRIP: 1 function found.
;Informative KIXSTRIP: no labels found.
;Summary KIXSTRIP: BREAK CALL DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE
;Informative KIXSTRIP: 1 BREAK
;Informative KIXSTRIP: 1 ENDFUNCTION
;Informative KIXSTRIP: 1 EXIT
;Informative KIXSTRIP: 1 FUNCTION
;
;($end)


Screen output of running kixstrip.exe with options /block_check /show_errors:

code:

Kixstrip 4.00 (vs 2.12e) (c) MCA - scripting@wanadoo.nl - 2000, 2001

1 ...E(45)


Kixstrip 4.00 (vs 2.12e) 0.22 (sec)

input 45 example3.kix
output 45 example3.txt (skip: 0 blocks: 0 labels: 0)
block_check block_structures=7 functions=1 labels=0
tab=6 (default)

Informative KIXSTRIP: no errors found.

active options:
/Block_Check /Headers /Print /Show_Errors /TAB=6 /Translate
inactive options:
/NoCombine /NoDebug /NoPerformance /NoProgress /NoShow_Structure
/NoLicense: (not.specified)


At least screen output of a great kixstrip.exe run:

code:

Kixstrip 4.00 (vs 2.11e) (c) MCA - scripting@wanadoo.nl - 2000, 2001

24000 ...E(24057)

Warning KIXSTRIP: 188 line incomplete "left parenthesis".
Warning KIXSTRIP: 260 block "function/endfunction" incompleted. starting point of block structure missing.
Warning KIXSTRIP: 261 block "select/case/endselect" incompleted. starting point of block structure missing.
Warning KIXSTRIP: 260, 261 block incompleted.
Warning KIXSTRIP: 188 line incompleted.

Kixstrip 4.00 (vs 2.12e) 132.15 (sec)

input 24057 example9.kix
output 18273 example9.out (skip: 5784 blocks: 0 labels: 19)

Warning KIXSTRIP: 1 block is incompleted. missing statement(s).
- do:until [135:135]
-ERROR- - for|each:in|to:step|next [3|2:2|2:2|3]
-ERROR- - function:endfunction [3:3]
- if:else:endif [4615:1341:4615]
-ERROR- - select:case:endselect [26:159:26]
- while:loop [37:37]
4819 block_structures found.
Warning KIXSTRIP: 3 functions found.
Warning KIXSTRIP: 1 line is incompleted.
rerun program with option "/block_check /show_errors".

active options:
/Combine /Headers /Show_Structure
/License: MCA - scripting@wanadoo.nl - 2000, 2001
inactive options:
/NoBlock_Check /NoDebug /NoPerformance /NoPrint /NoProgress /NoShow_Errors /NoTAB /NoTranslate


Any idea, comment, remark or question is welcome.
We appreciate it to do it to this board.
Greetings.

btw:
- checking of block structure by kixstrip.exe is more intelligent as the version
implementated by program kixref.exe
- related topics


_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA