Skip to content
The LDPL Standard Library
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
briefcases
images
LICENSE
README.md

README.md

The LDPL Standard Library

This repository contains the LDPL Standard Library, which contains many useful statements for the LDPL Programming Language not included in the base language.

The library is organized in a series of .ldpl files called briefcases, each containing new statements designed to extend the functionality of LDPL in particular areas. For example the brc_lists.ldpl briefcase includes general LIST releated statements, like FLIP LIST and SORT LIST - ASCENDING.

New statements and entire briefcases are welcome contributions, corrections and feedback are most certainly welcome as well.

How to use the LDPL Standard Library

Just download the briefcase you want and IMPORT it in your LDPL source file. For example, if you want to include the file brc_lists.ldpl you must add the line

INCLUDE "/route/to/std-lists.ldpl"

before the DATA: and PROCEDURE: sections.

Note: please bear in mind that at the moment the LDPL Standard Library only works with this experimental LDPL branch, so if by the time you read this that particular branch hasn't been merged into master, you'll have to pull from it in order to use the library.

Statements included in every briefcase

Every statement is documented in more detail in their own briefcase file.

  • brc_lists.ldpl (LIST statements):

    • DISPLAY LIST $
    • SORT LIST $ ASCENDING
    • SORT LIST $ DESCENDING
    • APPEND LIST $ TO LIST $
    • SPLICE ELEMENT $ OF LIST $
    • FLIP LIST $
  • brc_math.ldpl (mathematical statements):

    • FIND SQUARE ROOT OF $ IN $
    • PI constant
  • brc_random.ldpl (random statements):

    • GET RANDOM BETWEEN $ AND $ IN $
    • GET RANDOM INTEGER BETWEEN $ AND $ IN $
    • GET RANDOM ELEMENT FROM LIST $ IN $
    • SHUFFLE LIST $
  • brc_os.ldpl (operating system statements):

    • LIST CONTENTS OF DIRECTORY $ IN $
  • brc_text.ldpl (text statements):

    • SHIFT $ TO LOWER CASE IN $
    • SHIFT $ TO UPPER CASE IN $
    • SHIFT $ TO PROPER IN $

License

The LDPL Standard Library is distributed under the MIT License. LDPL is distributed under the GNU General Public License 3.0. All LDPL Dinosaur logos where created by Lartu and are released under a Creative Commons Attribution 4.0 International (CC BY 4.0) license.

You can’t perform that action at this time.