[Coco] noob question
Mathieu Bouchard
matju at artengine.ca
Wed Nov 8 11:20:49 EST 2017
Le 2017-11-07 à 16:23:00, Randy Weaver a écrit :
> I'm used to coding in c#... an event driven language.
I doubt it... but as nearly all cases of using a GUI library, there's an
infinite loop called a "runloop" that watches for incoming events and
distributes them around. The problem with ColorBASIC in this case, is that there
are no function pointers nor anything similar enough to that, the only thing
that vaguely looks like it are ON ERR GOTO, ON BRK GOTO, and they are not
extensible to user-defined events, so you couldn't write a ColorBASIC lib that
takes registrations for keys or mouse and GOSUB at will. (IIRC, ColorBASIC
doesn't support variable line numbers in ON GOSUB, does it ?)
Other languages might be different. With asm you can easily have some kind of
function pointers and JSR to the contents of a register or RAM variable.
______________________________________________________________________
| Mathieu BOUCHARD --- tél: 514.623.3801, 514.383.3801 --- Montréal, QC
More information about the Coco
mailing list