TrevorBradley
Active Member
- Joined
- Nov 6, 2007
- Messages
- 732
OK, another puzzler.
The following code does not work:
CODE
Program ProcessTest;
Begin
set_fps(60,0);
set_mode(320,240);
timer_function();
let_me_alone();
exit();
End;
Function timer_function()
Begin
timer();
Repeat
frame;
Until (key(_esc));
End;
Process timer()
Private
int mytext;
Begin
Loop
mytext=write(0,160,120,4,timer[0]);
frame;
delete_text(mytext);
End;
End;
If I move the timer() call to the main program (above timer_function()) it works fine.
Is it not possible to start processes from within functions?
Do you have to start all processes from the main function?
The following code does not work:
CODE
Program ProcessTest;
Begin
set_fps(60,0);
set_mode(320,240);
timer_function();
let_me_alone();
exit();
End;
Function timer_function()
Begin
timer();
Repeat
frame;
Until (key(_esc));
End;
Process timer()
Private
int mytext;
Begin
Loop
mytext=write(0,160,120,4,timer[0]);
frame;
delete_text(mytext);
End;
End;
If I move the timer() call to the main program (above timer_function()) it works fine.
Is it not possible to start processes from within functions?
Do you have to start all processes from the main function?