Alan Freedman -- The Computer Language Company - Computer Desktop Encyclopedia
Computer Desktop Encyclopedia
Longest-Running Tech Reference on the Planet

A CDE Definition

You'll love The Computer Desktop Encyclopedia (CDE) for Tech Term of the Day (TTOD)

LOOK UP ANOTHER TERM


event loop

A programming structure that continually tests for external events and calls the appropriate routines to handle them. An event loop is often the main loop in a program that typically waits for the user to trigger something. The following example is the main loop in the first software engine for this encyclopedia. Written in Turbo C, the main loop is constantly testing for menu selections, keystrokes and mouse clicks.

Functions
The statements with double parentheses are calls to functions (subroutines). For example, the bookmark() function creates a bookmark, and control is returned to the break statement. Break creates a go-to instruction to the beginning of the loop.

While
The while (1) statement creates a continuous loop until some condition is satisfied. In this example, the (1) means always true and keeps looping continuously. At the bottom (END OF EVENT LOOP), the curly brace (}) tells the compiler to insert a go-to instruction at that point that jumps to the beginning of the loop.

Switch
When testing for several conditions, the switch statement saves the programmer from having to write compare statements multiple times (if something is equal to, greater than or less than something else). In this example, the numbers are keyboard key codes (what key was just pressed?). See C, curly brace, event, event handler and event driven.








Personal Use Only

Before/After Your Search Term
BeforeAfter
evanescent fieldevent management system
Evans & Sutherlandevent manager
EVCevent messaging
EVDevent monitor
EVDOevent recorder
even parityevent sink
eventEvercookie
event data recorderEverest printer
event drivenEvernote
event handlerEVGA

Terms By Topic
Click any of the following categories for a list of fundamental terms.
Computer Words You Gotta KnowSystem design
Job categoriesUnix/Linux
Interesting stuffPersonal computers
InternetIndustrial Automation/Process Control
Communications & networkingAssociations/Standards organizations
HistoryDesktop publishing
Audio/VideoGraphics
MainframesSecurity
ProgrammingHealthcare IT
System design