# OpenEuphoria Manual

## Euphoria v4.1

routine or constant name search

| Up |  |  | TOC | Index
<< 5 Formal Syntax | < 6.1.15 mydata.ex | Up: 6 Mini-Guides | 6.1.17 pipes.ex > | 7 Included Tools >>

### 6.1.16 news.ex

Search news pages

All this demo does is read several Web pages in parallel and report on the number of occurrences of a word or phrase. Each page is handled by a separate Euphoria task running in parallel with several other tasks.

#### 6.1.16.1 Usage

    eui news.ex string

##### or:

    eui news.ex "a multi-word phrase"

Search is case insensitive.

This demo uses Euphoria's multitasking feature. It can run without change on all platforms supported by OpenEuphoria.

A Euphoria task is assigned to each instance URL query, searching the Web page text as it arrives. In this way, when a task is blocked due to a delayed response from a particular server, the program can easily switch to another task that is not blocked. The program quits after a period of 10-15 seconds with no progress made on any page.

| Up |  |  | TOC | Index
<< 5 Formal Syntax | < 6.1.15 mydata.ex | Up: 6 Mini-Guides | 6.1.17 pipes.ex > | 7 Included Tools >>