|
|
|||||||
{edit} 15-February-2007 Updated to EDITV32 as GETVAR is no longer available from Bill Stewart {/edit} #1) A quick way to check for code and errors is to implement the following test code: Code: GOTO where_is_the_end ; ; - your script - ; :where_is_the_end ? "end found" Version 4.20 and above of KiXtart has also built-in error controls (f.e. the program will now show you which line is in error or not found). #3) A Good Utility for your scripting toolbox are from http://home.wanadoo.nl/scripting/. These are the KIXSTRIP utilities and come in the following versions (3.x and 4.x). What do these do for us?
Detailed Documentation is available http://home.wanadoo.nl/scripting/download/kixstrip.pdfConsider the following code: Code: BREAK ON IF INGROUP("ACCOUNTING") ?"A Member" ELSE ?"Not a Member" If we run this through KiXStrip, we see: Code: ;($begin) ; ; mon 09-dec-2002 07:55:42 (kix 4.00 vs 3.20e) ; ;Informative KIXSTRIP: input=16 output=16 skip=0 ; ;Warning KIXSTRIP: 1 error in block structure. missing statement(s). ; - do:until [0:0] ; - for|each:in|to:step|next [0|0:0|0:0|0] ; - function:endfunction [0:0] ; -ERROR- - if:else:endif [1:1:0] ; - select:case:endselect [0:0:0] ; - while:loop [0:0] ;Warning KIXSTRIP: some lines contains errors or possible errors. ;Informative KIXSTRIP: 1 block_structure found. ;Informative KIXSTRIP: no UDF's found. ;Informative KIXSTRIP: no labels found. ;Summary KIXSTRIP: BREAK CALL DEBUG DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE ;Informative KIXSTRIP: 1 BREAK ; ;($end) ;($begin) ; ; ;($end) If we clean up the code a little.. Code: BREAK ON IF INGROUP("ACCOUNTING") ?"A Member" ELSE ?"Not a Member" ENDIF We see.. Code: ; ; mon 09-dec-2002 07:57:44 (kix 4.00 vs 3.20e) ; ;Informative KIXSTRIP: no errors found (input=17 output=17 skip=0). ; ;Summary KIXSTRIP: block structures ; - do:until [0:0] ; - for|each:in|to:step|next [0|0:0|0:0|0] ; - function:endfunction [0:0] ; - if:else:endif [1:1:1] ; - select:case:endselect [0:0:0] ; - while:loop [0:0] ;Informative KIXSTRIP: 1 block_structure found. ;Informative KIXSTRIP: no UDF's found. ;Informative KIXSTRIP: no labels found. ;Summary KIXSTRIP: BREAK CALL DEBUG DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE ;Informative KIXSTRIP: 1 BREAK ; ;($end) One of the ways that we have used this in a Batch file with Bill Stewart's EDITV32 Utility. Code: ::KIXCOMP.BAT - By: Kent Dyer 7/25/2001 editv32 -p "Enter the KiXscript minus the extension: " zInput echo %zInput% kixstrip422.exe %zInput%.kix %zInput%.out /BC /Headers /Print /SE /SS /TAB=6 /Translate Echo we are done!! pause cls |