Here is the code which could be used to run a routine in a while loops varying the arguments but with checks on the return code. This is difficult to do with nested ifs.
// when you test this be sure to define the correct types
$tb_list :=
'301' &
'302' &
'121' &
'131' &
'132' &
'133' &
'134' &
'135' &
'136' &
'137' &
'230' ; // type array
$tb_index := 1 ; // type integer
WHILE ( $tb_index <= ArraySize($tb_list)) DO
BEGIN
$tb_this := ArrayItem($tb_list,$tb_index) ; // type char(10)
logApollo(concat('Processing ',$tb_this)) ; // this logs and does a dos echo
$tb_index := $tb_index + 1 ;
// use this to debug output
delay(1) ;
END
// use this to debug output
delay(10) ;
Here is the logger routine
Logmsg(message);
system(concat('echo ',message)) ;
No comments:
Post a Comment