var total_str = 0;
STRING *list_str[999];
void add_to_str(STRING *str){
list_str[total_str] = str_create(str);
total_str++;
}
void test_list(scancode){
if(scancode == 2){ add_to_str("EUR"); }
if(scancode == 3){ add_to_str("USD"); }
if(scancode == 4){ add_to_str("AUD"); }
}
void main(){
on_1 = test_list; // add EUR to list
on_2 = test_list; // add USD to list
on_3 = test_list; // add AUD to list
int i = 0;
while(!key_esc){
// show total amount of strings
DEBUG_VAR(total_str, 10);
// cycle through all list and show it's elements
for(i = 0; i < total_str; i++){
draw_text(list_str[i], 10, 30 + 20 * i, COLOR_WHITE);
}
wait(1);
}
}