Dear,We were trying to check some new commands and functions. Special
attention takes the definition of functions.
Reason: previously an user can only create variables and labels.
commands, macro's and functions were prohibit to kixtart.
First we defined a existing function and after that we are trying
to run an unknown function (see line 18 + 24):
code:
?"- 1-" if redirectoutput("debug.2001")
?"- 2-" endif
?"- 3-" $max=10
?"- 4-" ? "==1==start>"
?"- 5-" ?
?"- 6-" $total=count($max)
?"- 7-" ?
?"- 8-" ? "total (call count): "+$total
?"- 9-" ?
?"- 10-" ? "==1==>"
?"- 11-" ?
?"- 12-" count($max) ; - will be recognized as function -
?"- 13-" ?
?"- 14-" ? "==1==end>"
?"- 15-" ?
?"- 16-" ? "==2==start>"
?"- 17-" ?
?"- 18-" $total=unknown_function($max)
?"- 19-" ?
?"- 20-" ? "total (call unknown_function): "+$total
?"- 21-" ?
?"- 22-" ? "==2==>"
?"- 23-" ?
?"- 24-" unknown_function($max) ; - will be recognized as an unknown command -
?"- 25-" ?
?"- 26-" ? "==2==end>"
?"- 27-" EXIT
?"- 28-"
?"- 29-" function count ($max)
?"- 30-" $cnt=0
?"- 31-" for $i=1 to $max step 2
?"- 32-" $cnt=$cnt+$i
?"- 33-" next
?"- 34-" $count=$cnt
?"- 35-" endfunction
After running the script the result is:
code:
- 3-
- 4-
==1==start>
- 5-- 6-
- 30-
- 31-
- 32-
- 33-
- 32-
- 33-
- 32-
- 33-
- 32-
- 33-
- 32-
- 33-
- 34-
- 35-
- 7-
- 8-
total (call count): 25
- 9-
- 10-
==1==>
- 11-
- 12-
- 30-
- 31-
- 32-
- 33-
- 32-
- 33-
- 32-
- 33-
- 32-
- 33-
- 32-
- 33-
- 34-
- 35-25
- 13-
- 14-
==1==end>
- 15-
- 16-
==2==start>
- 17-
- 18-10 <- result of $total=unknown_function($max)
- 19-
- 20-
total (call unknown_function): unknown_function
- 21-
- 22-
==2==>
- 23-
- 24-[/b]Script error : unknown command ![/b]
?"- 24-" unknown_function($max) ; - will be recognized as an unknown command -
Do we something wrong?
Greetings.