abseek, adel, adump, aget, ains, array, aseek, aset, asort, forall, map
and, eq, gt, lt, or, regex
eval, exec, load
for, forall, foreach, if, ifelse, loop, map, repeat, switch, unless, while
getdoc, setdoc
bread, bwrite, close, glob, mkdir, open, read, write
foreach, index, join, lsize, reverse, seek, sort, split
add, div, mod, mul, sub
print, printwn
sweep
NULL, false, filp_arch, filp_compile_date, filp_compile_options, filp_compile_time, filp_uname, filp_version, license, true
ARGV, STDERR, STDIN, STDOUT, errno, filp_bareword, filp_error, filp_error_info, filp_error_strings, filp_lang, filp_real, filp_stack_elems, filp_stack_size
dup, dupnz, idup, pop, rot, swap, swstack, tpop, tpush
chop, eq, gt, instr, join, length, lt, regex, split, sprintf, sscanf, strcat, substr
defined, enum, lsize, set, size, symbol, type, unset, val
getenv, putenv, shell, strerror, time, timer
ARGV, NULL, abseek, add, adel, adump, aget, ains, and, array, aseek, aset, asort, chop, defined, div, dumper, dup, dupnz, enum, eq, eval, exec, false, filp_bareword, filp_compile_date, filp_compile_time, filp_error, filp_error_info, filp_error_strings, filp_real, filp_stack_elems, filp_stack_size, filp_version, for, forall, foreach, getdoc, gt, idup, if, ifelse, index, instr, join, length, license, load, loop, lsize, lt, map, mod, mul, or, pop, repeat, reverse, rot, safe, seek, set, setdoc, size, sort, split, sprintf, sscanf, strcat, sub, substr, swap, sweep, switch, swstack, symbol, tpop, tpush, true, type, unless, unset, val, while
STDERR, STDIN, STDOUT, bread, bwrite, close, errno, filp_arch, filp_compile_options, filp_lang, filp_uname, getenv, glob, mkdir, open, print, printwn, putenv, read, regex, shell, strerror, time, timer, write
ARGV - Array of command-line arguments.
NULL - Stores a NULL value on the top of stack.
STDERR - Standard error file descriptor.
STDIN - Standard input file descriptor.
STDOUT - Standard output file descriptor.
abseek - Seeks a sorted array for a scalar.
add - Math sum.
adel - Deletes an element from an array.
adump - Dumps an array as a list.
aget - Gets an element from an array.
ains - Inserts a value into an array.
and - Boolean and.
array - Creates an array.
aseek - Seeks an array for a scalar.
aset - Assigns a value to an element of an array.
asort - Sorts an array.
bread - Reads a block of bytes from a file.
bwrite - Writes a block of bytes to a file.
chop - Chops the last character of a string.
close - Closes a file.
defined - Tests if a symbol is defined.
div - Math division.
dumper - Dumps a value (probably an array) as a tree.
dup - Duplicates the value in the top of stack.
dupnz - Duplicates the value in the top of stack if true.
enum - Defines a group of constants.
eq - String equality test.
errno - The C library errno variable.
eval - Executes a value as filp code and returns its error code.
exec - Executes a value as filp code.
false - Stores a false value on the top of stack.
filp_arch - Architecture id string.
filp_bareword - Use of barewords flag.
filp_compile_date - Compilation date.
filp_compile_options - Compilation options information.
filp_compile_time - Compilation time.
filp_error - Last error code.
filp_error_info - Text info about the last error.
filp_error_strings - Array of error strings.
filp_lang - Two letter code of the preferred language.
filp_real - Use of real numbers instead of integers flag.
filp_stack_elems - Number of elements currently in the stack.
filp_stack_size - Maximum size of the stack.
filp_uname - Operating system information.
filp_version - Version of filp.
for - Executes a block incrementing a value.
forall - Executes a block of code for all elements of the array
foreach - Executes a block of code for each element of a list.
getdoc - Gets documentation from a symbol.
getenv - Obtains the value of an environment string.
glob - Returns a list with a file expansion set.
gt - String 'greater than' test.
idup - Duplicates a specific value from the stack.
if - Conditional execution of code.
ifelse - Conditional execution of code.
index - Extract an element from a list by subscript.
instr - Search a string inside another.
join - Joins a list into a string.
length - Returns the length of a string.
license - Returns the filp license.
load - Loads a filp source code file and executes it.
loop - The infinite loop.
lsize - Returns the size of a list.
lt - String 'lower than' test.
map - Executes a block of code for all elements of the array modifying
mkdir - Creates a directory.
mod - Math modulo.
mul - Math multiply.
open - Opens a file.
or - Boolean or.
pop - Drops a value from the top of stack.
print - Prints a value to the standard output.
printwn - Prints a value to the standard output without newline.
putenv - Sets the value of an environment string.
read - Reads a line from a file.
regex - Matches a POSIX regular expression.
repeat - Executes a block of code a number of times.
reverse - Reverses a list.
rot - Rotates the stack.
safe - Enters isolate mode
seek - Seeks an element in a list.
set - Sets the value of a symbol.
setdoc - Set documentation for a symbol.
shell - Executes an external program.
size - Returns the size of a value.
sort - Sorts a list.
split - Splits a string into substrings.
sprintf - Formats into a string.
sscanf - Scans a string and extracts values.
strcat - Concatenates two strings.
strerror - Returns the system error string.
sub - Math substraction.
substr - Extracts a substring.
swap - Swaps the two values on top of the stack.
sweep - Collects garbage.
switch - Multiple conditional execution.
swstack - Swaps between the two stacks.
symbol - Sends symbol names to the stack.
time - Returns the time in seconds.
timer - millisecond timer
tpop - Stores the top of stack into the temporal variable.
tpush - Pushes the temporal variable to the stack.
true - Stores a true value on the top of stack.
type - Returns a string describing the type of a value.
unless - Conditional execution of code.
unset - Undefines a variable.
val - Returns the value of a symbol.
while - Conditional loop.
write - Writes a string to a file.
ARGV | Top |
Name
ARGV - Array of command-line arguments.Synopsis
ARGVDescription
This array contains the command-line arguments when used from the filp interpreter, or an empty array if used from an embedded version of the filp library.
Categories
Special variables
NULL | Top |
Name
NULL - Stores a NULL value on the top of stack.Synopsis
NULL NULL [ NULL ( NULLDescription
Stores a NULL value on the top of stack. Though [ is used as a delimiter for lists and ( for arrays, in practice all of them are the same.
Categories
Special constants
STDERR | Top |
Name
STDERR - Standard error file descriptor.Synopsis
STDERRDescription
This is the standard error file descriptor.
Categories
Special variables
STDIN | Top |
Name
STDIN - Standard input file descriptor.Synopsis
STDINDescription
This is the standard input file descriptor.
Categories
Special variables
STDOUT | Top |
Name
STDOUT - Standard output file descriptor.Synopsis
STDOUTDescription
This is the standard output file descriptor.
Categories
Special variables
abseek | Top |
Name
abseek - Seeks a sorted array for a scalar.Synopsis
array scalar abseek subscriptArguments
- array
- the array to be searched into
- scalar
- the value to be found
Description
Seeks a sorted array in search of a string. Returns the subscript where the scalar is if positive, or the position where it should be if negative.
Categories
Array commands
add | Top |
Name
add - Math sum.Synopsis
op1 op2 add result op1 op2 + resultArguments
- op1
- first operand
- op2
- second operand
Description
Sums both values and sends the result to the stack. If filp_real is set, the operation is made in real mode, or integer otherwise.
Categories
Math commands
adel | Top |
Name
adel - Deletes an element from an array.Synopsis
array_symbol subscript adel array subscript adel modified_arrayArguments
- array
- the array or array symbol
- subscript
- subscript of the element to be deleted
Description
Deletes an element from an array. The array shrinks. If subscript is zero, the last element is deleted and if it's out of range, nothing happens.
Categories
Array commands
adump | Top |
Name
adump - Dumps an array as a list.Synopsis
array adump [ array_elements ]Arguments
- array
- the array to be dumped.
Description
Dumps an array as a list.
Categories
Array commands
aget | Top |
Name
aget - Gets an element from an array.Synopsis
array subscript @ element array subscript aget elementArguments
- array
- the array
- subscript
- the number of the element to be taken
Description
Gets the element number subscript from the array. If subscript is out of range, NULL is returned instead. The array subscripts in filp starts at 1; the 0 element contains the total number of elements in the array.
Categories
Array commands
ains | Top |
Name
ains - Inserts a value into an array.Synopsis
array_symbol subscript value ains array subscript value ains modified_arrayArguments
- array
- the array or array symbol
- subscript
- the subscript number of the insertion position
- value
- the value to be inserted
Description
Inserts a value into the subscript position of an array. The elements with greater subscripts move up one position, incrementing the total size of the array by 1. Remember that the array subscripts in filp start at 1. If the subscript is 0 (array size), the element is added to the end.
Categories
Array commands
and | Top |
Name
and - Boolean and.Synopsis
bool1 bool2 and bool_result bool1 bool2 && bool_resultArguments
- bool1
- first boolean value.
- bool2
- second boolean value.
Description
Returns true if both values are true. The command && can be used as a synonym.
Categories
Boolean commands
array | Top |
Name
array - Creates an array.Synopsis
( value value ... ) new_array ( value value array new_arrayArguments
- value
- values that are part of the array.
Description
Creates an array. The ) character can be used as a synonym, and it's preferred as it's more intuitive. The new array value is left on the top of stack, ready to be asigned or used.
Categories
Array commands
aseek | Top |
Name
aseek - Seeks an array for a scalar.Synopsis
array scalar aseek subscriptArguments
- array
- the array to be searched into
- scalar
- the value to be found
Description
Seeks an array in search of a string. Returns the subscript where the scalar is, or 0 if not found.
Categories
Array commands
aset | Top |
Name
aset - Assigns a value to an element of an array.Synopsis
array_symbol subscript value aset array subscript value aset modified_arrayArguments
- array
- the array or array symbol
- subscript
- the subscript number to be asigned
- value
- the value to be set
Description
Assigns a value to the element subscript of an array. Remember that the array subscripts in filp start at 1. The @= command can be used as a synonym.
Categories
Array commands
asort | Top |
Name
asort - Sorts an array.Synopsis
array_symbol asort array asort sorted_arrayArguments
- array
- array or array symbol to be sorted
Description
Sorts (alfabetically) an array.
Categories
Array commands
bread | Top |
Name
bread - Reads a block of bytes from a file.Synopsis
size fdes bread size dataArguments
- size
- number of bytes to be read
- fdes
- file descriptor
Description
Reads a block of bytes from a file. The block of data and its size is returned. On EOF, the returned size will be zero.
Categories
File and directory commands
bwrite | Top |
Name
bwrite - Writes a block of bytes to a file.Synopsis
size data fdes bwriteArguments
- size
- size of the block of data
- data
- the block of data
- fdes
- the file descriptor
Description
Writes a block of bytes to a file.
Categories
File and directory commands
chop | Top |
Name
chop - Chops the last character of a string.Synopsis
string chop strinArguments
- string
- the string to be chopped
Description
Chops the last character of a string. Mainly to be used to cut the trailing \n character of a line read from a file.
Categories
String manipulation commands
close | Top |
Name
close - Closes a file.Synopsis
fdes closeArguments
- fdes
- file descriptor to be closed.
Description
Closes a file.
Categories
File and directory commands
defined | Top |
Name
defined - Tests if a symbol is defined.Synopsis
symbol defined bool_resultArguments
- symbol
- the symbol name to be tested
Description
Returns a boolean value telling whether the symbol is defined or not.
Categories
Symbol management commands
div | Top |
Name
div - Math division.Synopsis
divd divs div result divd divs / resultArguments
- divd
- dividend
- divs
- divisor
Description
Divides divd by divs and sends the result to the stack. If filp_real is set, the operation is made in real mode, or integer otherwise.
Categories
Math commands
dumper | Top |
Name
dumper - Dumps a value (probably an array) as a tree.Synopsis
value dumper value_treeArguments
- value
- the value to be dumped
Description
Dumps a value (probably an array) as a filp-parseable tree.
dup | Top |
Name
dup - Duplicates the value in the top of stack.Synopsis
value dup value valueArguments
- value
- the value to be duplicated
Description
Duplicates the value in the top of stack.
Categories
Stack manipulation commands
dupnz | Top |
Name
dupnz - Duplicates the value in the top of stack if true.Synopsis
value dupnz value valueArguments
- value
- the value to be duplicated
Description
Duplicates the value in the top of stack if it has a 'true' value.
Categories
Stack manipulation commands
enum | Top |
Name
enum - Defines a group of constants.Synopsis
[ list_elements ] first enumArguments
- list
- the list of constants to set
- first
- the value of the first element
Description
Defines a group of constants. The first (deeper in the stack) will have a value of first and so on, increasingly.
Categories
Symbol management commands
eq | Top |
Name
eq - String equality test.Synopsis
string1 string2 eq bool_valueArguments
- string1
- the first string
- string2
- the second string
Description
Compares the two strings and returns true if both are equal.
Categories
String manipulation commands, Boolean commands
errno | Top |
Name
errno - The C library errno variable.Synopsis
errnoDescription
This variable contains the C library errno variable.
Categories
Special variables
eval | Top |
Name
eval - Executes a value as filp code and returns its error code.Synopsis
value eval error_codeArguments
- value
- value to be executed
Description
Executes a value as filp code. It can be a string or a block of code. The error code will be put on the top of stack, and the execution is never interrupted.
Categories
Code execution commands
exec | Top |
Name
exec - Executes a value as filp code.Synopsis
value execArguments
- value
- value to be executed
Description
Executes a value as filp code. It can be a string or a block of code.
Categories
Code execution commands
false | Top |
Name
false - Stores a false value on the top of stack.Synopsis
false false_valueDescription
Stores a conditional value equal to 'false' on the top of stack.
Categories
Special constants
filp_arch | Top |
Name
filp_arch - Architecture id string.Synopsis
filp_archDescription
This string contains 'linux' if filp is running under any flavour of linux, 'win32' if under any flavour of MS Windows, 'beos' if under BeOS or 'unix' otherwise.
Categories
Special constants
filp_bareword | Top |
Name
filp_bareword - Use of barewords flag.Synopsis
filp_barewordDescription
If this flag is set, barewords (not-quoted words that are not recognized as commands) are treated as literal strings. Barewords are dangerous and hard to debug. Don't use it.
Categories
Special variables
filp_compile_date | Top |
Name
filp_compile_date - Compilation date.Synopsis
filp_compile_dateDescription
This string contains the date of compilation of the filp library.
Categories
Special constants
filp_compile_options | Top |
Name
filp_compile_options - Compilation options information.Synopsis
filp_compile_optionsDescription
This string contains human-readable information about possible compilation options or limitations.
Categories
Special constants
filp_compile_time | Top |
Name
filp_compile_time - Compilation time.Synopsis
filp_compile_timeDescription
This string contains the time of compilation of the filp library.
Categories
Special constants
filp_error | Top |
Name
filp_error - Last error code.Synopsis
filp_errorDescription
This variable contains the last error code. Can be used as an offset to the filp_error_strings filp array.
Categories
Special variables
filp_error_info | Top |
Name
filp_error_info - Text info about the last error.Synopsis
filp_error_infoDescription
This string contain additional info about the last error.
Categories
Special variables
filp_error_strings | Top |
Name
filp_error_strings - Array of error strings.Synopsis
filp_error_stringsDescription
This array contains the message associated to an error message contained in filp_error.
Categories
Special variables
filp_lang | Top |
Name
filp_lang - Two letter code of the preferred language.Synopsis
filp_langDescription
This variable contains the two letter code of the preferred language defined by the user. It mainly takes its value from the LANG environment variable, but other sources (mainly for win32) are tried as well.
Categories
Special variables
filp_real | Top |
Name
filp_real - Use of real numbers instead of integers flag.Synopsis
filp_realDescription
This flag tells filp if it must perform mathematical operations using integers (by default) or real numbers.
Categories
Special variables
filp_stack_elems | Top |
Name
filp_stack_elems - Number of elements currently in the stack.Synopsis
filp_stack_elemsDescription
The number of elements currently stored in the stack.
Categories
Special variables
filp_stack_size | Top |
Name
filp_stack_size - Maximum size of the stack.Synopsis
filp_stack_sizeDescription
The maximum number of values the stack is allowed to store. By default is 16384. Just to avoid mad code from devouring all the available memory.
Categories
Special variables
filp_uname | Top |
Name
filp_uname - Operating system information.Synopsis
filp_unameDescription
This string contains human-readable information about the operating system filp is running on.
Categories
Special constants
filp_version | Top |
Name
filp_version - Version of filp.Synopsis
filp_versionDescription
This string holds the current version of filp.
Categories
Special constants
for | Top |
Name
for - Executes a block incrementing a value.Synopsis
from inc to code_block forArguments
- from
- initial value
- inc
- increment to the value
- to
- final value
Description
Executes the block of code, sending previously a value to the stack. This value ranges from the initial from value, being incremented by inc until to (inclusive). The block of code must take this value from the stack.
Categories
Control structures
forall | Top |
Name
forall - Executes a block of code for all elements of the arraySynopsis
array { code } forallArguments
- array
- the array
- code
- the code to be executed
Description
Executes a block of code for each element of array after pushing each one to the stack. The code block must take the values from the top of stack on each iteration.
Categories
Control structures, Array commands
foreach | Top |
Name
foreach - Executes a block of code for each element of a list.Synopsis
[ list_elements ... ] code_block foreachArguments
- list_elements
- the list elements
- code_block
- block of code
Description
Executes a block of code for each element of a list, that is, until there is a NULL in the top of stack. The code block must take the values from the top of stack on each iteration. The NULL value is automatically dropped.
Categories
Control structures, List processing commands
getdoc | Top |
Name
getdoc - Gets documentation from a symbol.Synopsis
symbol getdoc documentation_stringArguments
- symbol
- the symbol
Description
Gets documentation from a symbol. If it hasn't any, it's name is returned instead.
Categories
Documentation commands
getenv | Top |
Name
getenv - Obtains the value of an environment string.Synopsis
envvar getenv valueArguments
- envvar
- the environment string name.
Description
Obtains the value of an environment string (as PATH or HOME). Returns the value or NULL if the variable does not exist.
Categories
System commands
glob | Top |
Name
glob - Returns a list with a file expansion set.Synopsis
filespec glob [ file_list ]Arguments
- filespec
- the filespec
Description
Returns a list with all the files that matches the filespec expression. This filespec is system dependent, but any combination of characters plus * or ? should work in all systems. The directory separator is /, though \ can also be used on MS Windows; anyway, the output list will always have / separators, that can also be used in all supported systems as an argument for
open()or similar.Categories
File and directory commands
gt | Top |
Name
gt - String 'greater than' test.Synopsis
string1 string2 gt bool_valueArguments
- string1
- the first string
- string2
- the second string
Description
Compares the two strings and returns true if the first one is greater (in ASCII) than the second one.
Categories
String manipulation commands, Boolean commands
idup | Top |
Name
idup - Duplicates a specific value from the stack.Synopsis
val#i val#i-1 ... val#1 i idup val#iArguments
- i
- the position number of the value to be duplicated.
Description
Creates a copy of the element number i from the stack, and leaves it in the first position. Stack elements start from 1.
Categories
Stack manipulation commands
if | Top |
Name
if - Conditional execution of code.Synopsis
bool code_block ifArguments
- bool
- boolean value
- code_block
- code block to execute
Description
Executes the block of code if bool is true.
Categories
Control structures
ifelse | Top |
Name
ifelse - Conditional execution of code.Synopsis
bool code_block_true code_block_false ifelseArguments
- bool
- boolean value
- code_block_true
- code block to execute when bool is true
- code_block_false
- code block to execute when bool is false
Description
Executes the first block of code if bool is true or the second if false.
Categories
Control structures
index | Top |
Name
index - Extract an element from a list by subscript.Synopsis
[ elements_of_list ] offset index valueArguments
- elements_of_list
- the elements of the list
- offset
- offset of the element to be extracted
Description
Extract the element number offset from the list, and puts it on the top of stack. If the offset is out of range (i.e. there are less elements in the list), NULL is returned instead.
Categories
List processing commands
instr | Top |
Name
instr - Search a string inside another.Synopsis
string substring instr offsetArguments
- string
- the string to be searched into
- substring
- the substring to be searched
Description
Search a substring inside a string. If it's found, the offset is returned, or 0 instead. Remember that string offsets start from 1.
Categories
String manipulation commands
join | Top |
Name
join - Joins a list into a string.Synopsis
[ list_elements ] joiner join stringArguments
- joiner
- the joiner string
- list_elements
- the elements of the list
Description
Joins a list into a string, using the string joiner as a glue.
Categories
String manipulation commands, List processing commands
length | Top |
Name
length - Returns the length of a string.Synopsis
string length lenArguments
- string
- the string
Description
Returns the length of the string.
Categories
String manipulation commands
license | Top |
Name
license - Returns the filp license.Synopsis
license license_textDescription
Returns a text string containing the license of the filp library (The GNU Public License, GPL).
Categories
Special constants
load | Top |
Name
load - Loads a filp source code file and executes it.Synopsis
file_name loadArguments
- file_name
- the name of the file to be executed.
Description
Loads a filp source code file and executes it.
Categories
Code execution commands
loop | Top |
Name
loop - The infinite loop.Synopsis
code_block loopArguments
- code_block
- the block of code to execute eternally
Description
Executes code_block until the end of times.
Categories
Control structures
lsize | Top |
Name
lsize - Returns the size of a list.Synopsis
[ list_elements ] lsize numberArguments
- list
- the list
Description
Returns the number of elements of a list.
Categories
Symbol management commands, List processing commands
lt | Top |
Name
lt - String 'lower than' test.Synopsis
string1 string2 lt bool_valueArguments
- string1
- the first string
- string2
- the second string
Description
Compares the two strings and returns true if the first one is lower (in ASCII) than the second one.
Categories
String manipulation commands, Boolean commands
map | Top |
Name
map - Executes a block of code for all elements of the array modifyingSynopsis
array_symbol { code } map array { code } map modified_arrayArguments
- array
- the array or array symbol
- code
- the code to be executed
Description
Executes a block of code for each element of array after pushing each one to the stack. At the end of the block, the value in the top of stack will be assigned to the element. If array is an immediate value (i.e. not a symbol), the modified array is left on the stack.
Categories
Control structures, Array commands
mkdir | Top |
Name
mkdir - Creates a directory.Synopsis
dirname mkdirArguments
- dirname
- directory name
Description
Creates a directory.
Categories
File and directory commands
mod | Top |
Name
mod - Math modulo.Synopsis
divd divs mod remainder divd divs % remainderArguments
- divd
- dividend
- divs
- divisor
Description
Divides divd by divs and sends the remainder to the stack. This operation is always made in integer mode regardless of the value of filp_real.
Categories
Math commands
mul | Top |
Name
mul - Math multiply.Synopsis
op1 op2 mul result op1 op2 * resultArguments
- op1
- first operand
- op2
- second operand
Description
Multiplies both values and sends the result to the stack. If filp_real is set, the operation is made in real mode, or integer otherwise.
Categories
Math commands
open | Top |
Name
open - Opens a file.Synopsis
"filename" open fdes ">filename" open fdes ">>filename" open fdes "+filename" open fdes "+>filename" open fdes "|program" open fdes "program|" open fdesArguments
- filename
- the name of the file to be opened.
Description
Opens a file. If no prefix is used, the file is open for reading; The valid prefixes are: '>', open for writing; '>>', open for appending; '+', reading and writing, positioned in the beginning; '+>', reading and writing, truncating; '|', treat the file name as a program which standard input will be the file. The valid suffixes are: '|', treat the file name as a program which standard output will be the file. Pipes doesn't work in MS Windows by now. Returns a file descriptor, or NULL if file could not be opened.
Categories
File and directory commands
or | Top |
Name
or - Boolean or.Synopsis
bool1 bool2 or bool_result bool1 bool2 || bool_resultArguments
- bool1
- first boolean value.
- bool2
- second boolean value.
Description
Returns true if any value are true. The command || can be used as a synonym.
Categories
Boolean commands
pop | Top |
Name
pop - Drops a value from the top of stack.Synopsis
value popArguments
- value
- the value to be dropped
Description
Drops a value from the top of stack. The value is destroyed.
Categories
Stack manipulation commands
| Top |
Name
print - Prints a value to the standard output.Synopsis
value print value ?Arguments
- value
- value to be printed
Description
Prints a value to the standard output followed by a newline (\n). The command ? can be used as a synonym.
Categories
Output commands
printwn | Top |
Name
printwn - Prints a value to the standard output without newline.Synopsis
value printwn value ??Arguments
- value
- value to be printed
Description
Prints a value to the standard output. The command ?? can be used as a synonym.
Categories
Output commands
putenv | Top |
Name
putenv - Sets the value of an environment string.Synopsis
envvar value putenvArguments
- envvar
- the environment string name
- value
- the scalar value to be stored
Description
Sets the value of an environment string.
Categories
System commands
read | Top |
Name
read - Reads a line from a file.Synopsis
fdes read lineArguments
- fdes
- file descriptor
Description
Reads a line from a file. Returns the line or NULL on EOF.
Categories
File and directory commands
regex | Top |
Name
regex - Matches a POSIX regular expression.Synopsis
str re =~ bool_value str re regex bool_valueArguments
- re
- string containing the regular expression
- str
- the string to test
Description
Tests if str matches the re POSIX regular expression. Returns true if the string matches. See the regex(7) man page for more information about POSIX regular expressions.
Categories
String manipulation commands, Boolean commands
repeat | Top |
Name
repeat - Executes a block of code a number of times.Synopsis
times code_block repeatArguments
- times
- number of repetitions
- code_block
- block of code to execute
Description
Executes a block of code a number of times.
Categories
Control structures
reverse | Top |
Name
reverse - Reverses a list.Synopsis
[ elem-1 elem-2 ... elem-n ] reverse [ elem-n ... elem-2 elem-1 ]Arguments
- elem-1
- elements of the list
Description
Reverses a list.
Categories
List processing commands
rot | Top |
Name
rot - Rotates the stack.Synopsis
val#i val#i-1 ... val#1 i rot val#i-1 ... val#1 val#iArguments
- i
- the element number from where the stack will be rotated.
Description
Rotates the stack. The element number i moves to the top of the stack, shifting all the upper ones one position down.
Categories
Stack manipulation commands
safe | Top |
Name
safe - Enters isolate modeSynopsis
safeDescription
Enters isolate mode, so all potentially dangerous commands as file access, environment variable definitions and external command executions are disabled. There is no turning back. When executed inside an 'eval' code, isolate mode operates only inside it.
seek | Top |
Name
seek - Seeks an element in a list.Synopsis
[ elements_of_list ] value seek offsetArguments
- elements_of_list
- elements of the list
- value
- value to be searched for
Description
Seeks an element in the list. If the element is found, its offset is returned on the top of stack; in not, 0 is returned instead. Take note that list elements are numbered from 1.
Categories
List processing commands
set | Top |
Name
set - Sets the value of a symbol.Synopsis
variable content set variable content def variable content = command { content } setArguments
- symbol
- symbol name
- content
- content to be stored in the symbol
Description
Sets the value of a symbol. If the content is code surrounded by { } , the symbol is marked as executable and becomes a command, otherwise it will be a plain variable. The commands def and = can be used as synonyms of set.
Categories
Symbol management commands
setdoc | Top |
Name
setdoc - Set documentation for a symbol.Synopsis
documentation_string symbol setdocArguments
- documentation_string
- String to be associated to the symbol
- symbol
- the symbol
Description
Stores documentation for a symbol.
Categories
Documentation commands
shell | Top |
Name
shell - Executes an external program.Synopsis
program shell output_from_programDescription
Executes an external program and sends all of its output to the stack.
Categories
System commands
size | Top |
Name
size - Returns the size of a value.Synopsis
value size size_in_bytesArguments
- value
- the value which size is queried
Description
Returns the size in bytes of the value. Note that this number is not necessary the same as the length.
Categories
Symbol management commands
sort | Top |
Name
sort - Sorts a list.Synopsis
[ list_elements ] sort [ sorted_elements ]Arguments
- list
- the list
Description
Sorts a list.
Categories
List processing commands
split | Top |
Name
split - Splits a string into substrings.Synopsis
string separator split [ string_slices ]Arguments
- string
- the string to be splitted
- separator
- the separator
Description
Splits a string into a list by the separator. If separator is an empty string, string is splitted by char.
Categories
String manipulation commands, List processing commands
sprintf | Top |
Name
sprintf - Formats into a string.Synopsis
value [ value ... ] format_string sprintf result_stringArguments
- value
- values to be inserted
- format_string
- printf style formatting string
Description
Makes a
printf()-like formatting into a string. As in that function, the percent char is used as a placeholder for a formatting command.Categories
String manipulation commands
sscanf | Top |
Name
sscanf - Scans a string and extracts values.Synopsis
string format_string sscanf value1 value2 ...Arguments
- string
- the string to be scanned
- format_string
- the format string
Description
Scans a string and extracts values using a
scanf()-like format string.Categories
String manipulation commands
strcat | Top |
Name
strcat - Concatenates two strings.Synopsis
str1 str2 strcat str1str2 str1 str2 . str1str2Arguments
- str1
- the first string
- str2
- the second string
Description
Concatenates two strings. The . command can be used as a synonym.
Categories
String manipulation commands
strerror | Top |
Name
strerror - Returns the system error string.Synopsis
errno strerrorArguments
- errno
- the error number
Description
Returns the system error string. errno must be the value of the filp_errno variable.
Categories
System commands
sub | Top |
Name
sub - Math substraction.Synopsis
min subt sub result min subt - resultArguments
- min
- minuend
- subt
- subtrahend
Description
Substracts subt from min and sends the result to the stack. If filp_real is set, the operation is made in real mode, or integer otherwise.
Categories
Math commands
substr | Top |
Name
substr - Extracts a substring.Synopsis
string offset size substr substringArguments
- string
- the string to be extracted from
- offset
- offset of the first character in string
- size
- number of characters to be extracted
Description
Extracts a substring from the string, starting at offset. Take note that string subscripts start from 1.
Categories
String manipulation commands
swap | Top |
Name
swap - Swaps the two values on top of the stack.Synopsis
value2 value1 swap value1 value2 value2 value1 xchg value1 value2 value2 value1 # value1 value2Arguments
- val2
- second value
- val1
- first value
Description
Swaps the two values on top of the stack. The commands xchg or # are synonyms.
Categories
Stack manipulation commands
sweep | Top |
Name
sweep - Collects garbage.Synopsis
sweepDescription
Calls the internal garbage collector.
Categories
Special commands
switch | Top |
Name
switch - Multiple conditional execution.Synopsis
[ condition_code execute_code ... ] switchArguments
- condition_code
- Code to be executed for the condition test
- execution_code
- Code to be executed if condition is true
Description
Executes from top to down the condition block codes and, if one of them returns a true value, executes the associated execution code block and continues on the next instruction. The first condition / execution code pairs being run are the nearest to the switch instruction, and all of them are really a list, so the [ terminator must not be forgotten. To implement a clause similar to the 'default' one from the C language
switch()command, it must be the last one and its condition code be always true.Categories
Control structures
swstack | Top |
Name
swstack - Swaps between the two stacks.Synopsis
swstackDescription
Filp has two stacks, one on use and the other 'dormant'. This command swaps between the two stacks. It's used basicly when a running process can destroy valid information stored in the current stack, so this command puts it in a safe place. The variable filp_stack_elems is set accordingly.
Categories
Stack manipulation commands
symbol | Top |
Name
symbol - Sends symbol names to the stack.Synopsis
prefix symbol [ symbols ... ]Arguments
- prefix
- prefix of the symbol names to send to the stack
Description
Sends to the stack as a list all symbol names beginning with prefix. If prefix is "" (the empty string), all symbol names will be pushed.
Categories
Symbol management commands
time | Top |
Name
time - Returns the time in seconds.Synopsis
time time_tDescription
Returns the time in seconds. This is the value returned by the C function
time().Categories
System commands
timer | Top |
Name
timer - millisecond timerSynopsis
timer msec_timerDescription
Returns a millisecond timer.
Categories
System commands
tpop | Top |
Name
tpop - Stores the top of stack into the temporal variable.Synopsis
value tpopArguments
- value
- value to be stored
Description
Stores the top of stack into the temporal variable ($_).
Categories
Stack manipulation commands
tpush | Top |
Name
tpush - Pushes the temporal variable to the stack.Synopsis
tpush valueDescription
Pushes the temporal variable ($_) to the stack.
Categories
Stack manipulation commands
true | Top |
Name
true - Stores a true value on the top of stack.Synopsis
true true_valueDescription
Stores a conditional value equal to 'true' on the top of stack.
Categories
Special constants
type | Top |
Name
type - Returns a string describing the type of a value.Synopsis
value type type_stringArguments
- value
- the symbol or value.
Description
Returns a string describing the type of a value. If value is a name of a symbol, the type of its content is returned; otherwise, the value type itself is returned. The returned value can be one of SCALAR, CODE, BIN_CODE, EXT_INT, EXT_REAL, EXT_STRING, NULL, FILE or ARRAY.
Categories
Symbol management commands
unless | Top |
Name
unless - Conditional execution of code.Synopsis
bool code_block unlessArguments
- bool
- boolean value
- code_block
- code block to execute
Description
Executes the block of code if bool is false.
Categories
Control structures
unset | Top |
Name
unset - Undefines a variable.Synopsis
<variable> unset <variable> undefArguments
- variable
- variable name to be undefined
Description
Undefines a variable. The command undef is a synonym.
Categories
Symbol management commands
val | Top |
Name
val - Returns the value of a symbol.Synopsis
string val contentArguments
- string
- the symbol name which value has to be gotten
Description
Treats the string as a symbol name and returns its value. If it does not exist as a symbol, NULL is returned instead.
Categories
Symbol management commands
while | Top |
Name
while - Conditional loop.Synopsis
condition_code repeat_code whileArguments
- condition_code
- Code to execute to evaluate condition
- repeat_code
- Code to execute if condition code is not NULL
Description
While the execution of condition_code returns a non-NULL value, repeat_code is also executed, having that value available in the top of stack for being processed. The NULL result of condition_code is clean from the stack.
Categories
Control structures
write | Top |
Name
write - Writes a string to a file.Synopsis
string fdes writeArguments
- string
- string to be written to the file
- fdes
- file descriptor
Description
Writes a string to a file.
Categories
File and directory commands
| Angel Ortega - angel@triptico.com | Built with mp_doccer 1.2.0 |