Jump to content

Curl/Example 1

From Wikibooks, open books for an open world
|| ===== begin of program ========
{curl 3.0, 4.0, 5.0, 6.0 applet}
Hello World!
|| ======end of program ========

Explanation

Curl commands appear between {} curly braces - hence the name "Curl".

In this example the first line of the code starts with a comment, the two vertical lines. This is similar to the REMark or // of other languages and is used for documentation.

{curl 3.0, 4.0, 5.0, 6.0 applet}

The second line is the 'herald ' - it declares the language and compatible Curl API version numbers and is similar to the <HTML> header in web pages. It is required. When multiple API version numbers are listed, that means that the applet is intended to be compatible with running in any of those versions of the Runtime Environment (RTE). A user can have more than one version of the RTE installed at the same time, but the highest version installed is the plug-in which will control the interactions with the browser, invoking lower numbered versions of the RTE if needed.

The remaining lines are the applet itself.

Hello World!

|| ======end of program ========

which displays the familiar Hello World!