AFL

Arguably Functional Language



AFL Documentation

Core Functions


This entry contains descriptions for all normal functions that are not part of any component.

Functions

input(0)

  • Parameters: none

  • Description: prompts the user for one line of input. Returns what the user entered.

  • Returns: string

typeOf(1)

  • Parameters: value val

  • Description: returns the type of val.

  • Returns: type

toCharArray(1)

  • Parameters: string str

  • Description: Returns an array of every char from str, in their original order.

  • Returns: array

isType(2)

  • Parameters: string str, type tp

  • Description: Returns whether str could be converted to type tp. Arrays are not a valid type to check for.

  • Returns: bool

toType(2)

  • Parameters: string str, type tp

  • Description: Converts str to type tp, if possible.

  • Returns: a value tp's type

random(0)

  • Parameters: none

  • Description: Returns a random decimal from 0 to 1.

  • Returns: num

clear(0)

  • Parameters: none

  • Description: Clears the console.

  • Returns: nothing

sleep(1)

  • Parameters: num ms

  • Description: Halts execution for ms miliseconds.

  • Returns: nothing

printCompleteNamespace(0)

  • Parameters: none

  • Description: Prints every function currently defined in AFL, excluding control functions.

  • Returns: nothing