Documentation
Table of Contents
fcl file extension
fcl use it's own file extension, text/fcl. Meaning any file ment for fcl ends with ".fcl".
Syntax
Very few Data Types are needed in FCL, however most Data Types are supported. FCL is designed to use the Data Types for specific actions only.
Integer 100
Float 1.00
String "Hello"
Only one include() statement should exist in .fcl files. The includes may be seperated as shown below.
include("fcl:std:io:webrequest")
Because fcl is a function chain. It can at times be written as a simple list.
include("fcl:std")
cli_print_count_from_to(0, 100)
cli_print_countdown_from_to(100, 0)
A little more advanced example might look like this:
include("fcl:std")
cli_print_countdown(cli_print_count_from_to(0, 100))
Library Structure
The fcl libraries follows an low to high order hierarchical structure. Meaning the most basics exist in fcl:std. When speaking of "higher" orders, everything that is above fcl:std is called a higer order.
The higer order of the function chain, the more complex the library functions become. For example with fcl:std:webrequests, now we have serval possible parameters and diffirent ways of calling and returning data.
- std - Basic Command Line. Math, Loops and Conditions.
- io - Input/Output. Directory, File Creation, Writing, Appending and Reading.
- webrequests - Retrives Data from Websites. Text/JSON format. Can use both GET and POST Methods.
- shell - Execute System Command(s).
- encode - Encode (Transcode). E.g Change File Format.
fcl-c does opperative system recognition automaticly. On *nix based systems fcl will be located in /home/user/.fcl/, while on Windows it will be C:\Users\user\.fcl\.
fcl-c
FCL Interpetor and Compiler. Note: fcl-c is written in Python for easy portability. Python must be installed on your system. If you do not have python installed it can be downloaded from the Official Site.
If using the FCL Personal Development Envoriment, fcl-c will be included.
Run/Setup
py fcl-c
python3 fcl-c
*nix envoriment
cp fcl-c.py /usr/bin/fcl-c
./fcl-c
The first compiler paramater must be the file to compile. See below for options.
- -c Compile. Can also be followed by a language selector. E.g: PHP, Js, Python. However, currently only Python is supported, and is therefore often left blank.
- -C Complexity Definition (integer: 1-3)
- -o Output name
./fcl-c main.fcl -c py
Assuming we now have the below include definition. We already know that "std" should be "py" or Python.
include("fcl:std")
As fcl-c is called with "-c" and "py" is defined we know to look in "./fcl/py/" for our Standard Libraries. This can of course also be written like:
include("fcl:py")
However, this will add enumeration overhead as an extra step to map out the Library path is now started.
Complexity: -C. Described as integer between 1-3. Where 1 means the chain is a plain list.
./fcl-c main.fcl -c py -C 1
If fcl-c see two nested function calls, this will stop and display an error.
Updating fcl-c libraries
./fcl-c -update
Page: 1/3