void SUB_REMOVEELEMENTS(qbs*_SUB_REMOVEELEMENTS_STRING_A,int32*_SUB_REMOVEELEMENTS_LONG_FIRST,int32*_SUB_REMOVEELEMENTS_LONG_LAST,int32*_SUB_REMOVEELEMENTS_LONG_KEEPINDEXING){
qbs *tqbs;
ptrszint tmp_long;
int32 tmp_fileno;
uint32 qbs_tmp_base=qbs_tmp_list_nexti;
uint8 *tmp_mem_static_pointer=mem_static_pointer;
uint32 tmp_cmem_sp=cmem_sp;
#include "data114.txt"
mem_lock *sf_mem_lock;
new_mem_lock();
sf_mem_lock=mem_lock_tmp;
sf_mem_lock->type=3;
if (is_error_pending()) goto exit_subfunc;
do{
if(!qbevent)break;evnt(25752,179,"elements.bas");}while(r);
do{
qbs_set(_SUB_REMOVEELEMENTS_STRING_A2,qbs_new_txt_len("",0));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(25752,181,"elements.bas");}while(r);
do{
*_SUB_REMOVEELEMENTS_LONG_N=FUNC_NUMELEMENTS(_SUB_REMOVEELEMENTS_STRING_A);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(25752,186,"elements.bas");}while(r);
S_34251:;
fornext_value4006= 1 ;
fornext_finalvalue4006=*_SUB_REMOVEELEMENTS_LONG_N;
fornext_step4006= 1 ;
if (fornext_step4006<0) fornext_step_negative4006=1; else fornext_step_negative4006=0;
if (is_error_pending()) goto fornext_error4006;
goto fornext_entrylabel4006;
while(1){
fornext_value4006=fornext_step4006+(*_SUB_REMOVEELEMENTS_LONG_I);
fornext_entrylabel4006:
*_SUB_REMOVEELEMENTS_LONG_I=fornext_value4006;
if (fornext_step_negative4006){
if (fornext_value4006<fornext_finalvalue4006) break;
}else{
if (fornext_value4006>fornext_finalvalue4006) break;
}
fornext_error4006:;
if(qbevent){evnt(25752,187,"elements.bas");if(r)goto S_34251;}
S_34252:;
if (((-(*_SUB_REMOVEELEMENTS_LONG_I<*_SUB_REMOVEELEMENTS_LONG_FIRST))|(-(*_SUB_REMOVEELEMENTS_LONG_I>*_SUB_REMOVEELEMENTS_LONG_LAST)))||is_error_pending()){
if(qbevent){evnt(25752,188,"elements.bas");if(r)goto S_34252;}
do{
qbs_set(_SUB_REMOVEELEMENTS_STRING_A2,qbs_add(qbs_add(_SUB_REMOVEELEMENTS_STRING_A2,__STRING1_SP),FUNC_GETELEMENT(_SUB_REMOVEELEMENTS_STRING_A,_SUB_REMOVEELEMENTS_LONG_I)));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(25752,189,"elements.bas");}while(r);
}else{
S_34255:;
if ((*_SUB_REMOVEELEMENTS_LONG_KEEPINDEXING)||is_error_pending()){
if(qbevent){evnt(25752,191,"elements.bas");if(r)goto S_34255;}
do{
qbs_set(_SUB_REMOVEELEMENTS_STRING_A2,qbs_add(_SUB_REMOVEELEMENTS_STRING_A2,__STRING1_SP));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(25752,191,"elements.bas");}while(r);
}
}
fornext_continue_4005:;
}
fornext_exit_4005:;
S_34260:;
if ((qbs_cleanup(qbs_tmp_base,qbs_equal(qbs_left(_SUB_REMOVEELEMENTS_STRING_A2, 1 ),__STRING1_SP)))||is_error_pending()){
if(qbevent){evnt(25752,194,"elements.bas");if(r)goto S_34260;}
do{
qbs_set(_SUB_REMOVEELEMENTS_STRING_A2,qbs_right(_SUB_REMOVEELEMENTS_STRING_A2,_SUB_REMOVEELEMENTS_STRING_A2->len- 1 ));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(25752,194,"elements.bas");}while(r);
}
do{
qbs_set(_SUB_REMOVEELEMENTS_STRING_A,_SUB_REMOVEELEMENTS_STRING_A2);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(25752,196,"elements.bas");}while(r);
exit_subfunc:;
free_mem_lock(sf_mem_lock);
#include "free114.txt"
if ((tmp_mem_static_pointer>=mem_static)&&(tmp_mem_static_pointer<=mem_static_limit)) mem_static_pointer=tmp_mem_static_pointer; else mem_static_pointer=mem_static;
cmem_sp=tmp_cmem_sp;
}
