LARP flowcharts

This section presents LARP's flowcharts. The diagrams and language are flexible and intuitive, allowing one to easily formulate algorithms.

This first example illustrates the syntax of flowchart instructions in LARP. It displays on screen the character string Hello world!

First flowchart

A LARP algorithm must start with keyword START. This instruction indicates where the algorithm's execution starts. The following instruction (in the above example, WRITE "Hello world!") is the first instruction to be executed. Reciprocally, the END iinstruction indicates where execution ends.

Flowchart language syntax

As any programming language, LARP provides a set of instructions allowing one to formulate algorithms as flowcharts. These instructions may accept one or more arguments and their syntax corresponds to one of the following formats:

instruction arg1, arg2, ...


instruction (arg1, arg2, ...)

The examples below use the WRITE instruction to display results in the execution console. A single WRITE instruction can produce several results:

Syntax forms

As noted in this example, WRITE instructions adopt the first form of syntax while MAXIMUM instructions adopt the second form.

Polymorphic contextual language

Unlike most traditional programming languages (such as C++ and Java), LARP is polymorphic contextual. This term means that a LARP algorithm does not have to explicitly define its variables prior to using them. This programming philosophy is frequently found in scripting languages such as Perl and Lisp. Since the type of a variable depends on its contents and this contents may vary during the execution of the algorithm, so does its type.

LARP supports integer and real values, character strings and containers (grouping values of various types):

Polymorphic language


LARP’s language provides instructions for reading data (READ) and for writing results (WRITE). These two instructions interact with the execution console to allow an algorithm to read data from the keyboard and display results on screen:

Inputs and outputs.

One instruction (QUERY) even allows to write a query and read the answer in a single instruction.

Conditional and iterative structures

LARP supports many conditional structures (IF, IF-ELSE, IF-ELSE-IF, SELECT) and iterative structures (WHILE, REPEAT-UNTIL, FOR) found in traditional programming languages:


Modular programming

Modular programming is a technique used to create complex algorithms. It consists in splitting a complex algorithm into smaller ones. Each small algorithm, written as flowchart or pseudo code, is called a module and carries out a simple task. All modules within an algorithm cooperate in order to perform the algorithm’s tasks.

Main module. Auxiliary module.

Files and input/output buffers

By default, during execution an algorithm reads data through the keyboard and produces results in the execution console (i.e. the screen). The keyboard (for inputs) and the execution console (for outputs) are said to be standard input/output interfaces in LARP.

LARP is also able to process data retrieved from external documents and/or store data into such documents. It supports two external sources of information:

  • Input/output buffers: data storage integrated to a LARP project. Such buffers allows to read and/or write directly in a document inserted into LARP project. As for modules, input/output buffers are identified by an unique name and listed in the document browser.
  • Files: data storage generally located on the computer’s hard disk (or on any peripheral device accessible through the computer’s file system). Files are identified with a unique name in the file system of the computer running LARP.

Buffers and files.

The above flowcharts provide an overview of LARP's programming language syntax and functionalities. To have a thorough description of its programming language, see LARP's online documentation (also available on the Web). Note that all flowcharts presented in this page may also be written as pseudo code