Category:ALGOL 68-l-system

From Rosetta Code
This is an example of a library. You may see a list of other libraries used on Rosetta Code at Category:Solutions by Library.

ALGOL 68-l-system is a set of L-System related modes and operators for use in ALGOL 68 programs.

To use this in a program, copy the source code from the Talk page to a text file called lsystem.incl.a68, putting it in the same directory as the importing program.
Then add PR read "lsystem.incl.a68" PR to the source of the program.

If you are using ALGOL_68G or another compiler/interpreter that supports the read pragmatic comment, then the program can be run as usual.
For other compilers, the ALGOL 68 pre-processor in Compiler/Simple file inclusion pre processor can be used (see the instructions on that page).


The following modes are defined in this library:

  • LRULE a rewriting rule for an L-System.
  • LSYSTEM an axiom and set of rules defining an L-System.


The following operators are defined in this library:

  • OP (CHAR,CHAR)LRULE -> creates a rewriting rule
  • OP (CHAR,STRING)LRULE -> creates a rewriting rule
  • OP (LSSYTEM,INT)STRING EVAL iterates the L-System the specified number of times
  • OP (STRING,PROC(CHAR)VOID)VOID INTERPRET interprets the results of evaluating an L-System

See the Sierpinski square curve ALGOL 68 sample for an example of using this library.

Pages in category "ALGOL 68-l-system"

The following 7 pages are in this category, out of 7 total.