[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
QbasicFAQ_Events
What is event programming?


Back to QBasic FAQ Main Page.

Before the advent of Windows, most software was not programmed in event driven languages, but rather polled languages. Event programming is somewhat easier because, cause and action inside the program are based on the "event" taking place, rather than polling (continually checking a device, a variable, etc.).

The best way to explain this is with the way the two different methods handle mouse routines. In polled language, you must create a conditional loop while using the mouse, and once the condition is met, an action is taken. (Say using IF/ THEN or possibly SELECT CASE.) Then you must continually check to see if the mouse has performed the action.

In an event driven language. You construct the program to handle an event when it occurs.

Example: OnMouseClick PressButton1%

The operating system reports the event through the kernel, and you then can handle it.

last edited (December 9, 2002) by KDivad Leahcim, Number of views: 2680, Current Rev: 5 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.