alisp:frontierspace_operators
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
alisp:frontierspace_operators [2010/12/16 21:26] – external edit 127.0.0.1 | alisp:frontierspace_operators [2018/06/23 00:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Special FrontierSpace Math Operators ====== | + | Y06Pf9 , [url=http:// |
- | There are several [[ALisp:About | ALisp]] [[built-in operators]] that work with the [[Fspace:About | FrontierSpace engine]]. These are further categorized as follows: | + | |
- | + | ||
- | ===== ALisp Boolean Operators ===== | + | |
- | not - returns the boolean opposite of its one argument | + | |
- | ! - alias for not | + | |
- | eq? - returns whether its arguments are the same object | + | |
- | equal? - returns whether or not its arguments are all equal | + | |
- | = - alias for equal? | + | |
- | != - equivalent of applying not to equal? | + | |
- | > - returns whether its arguments are in strictly descending order | + | |
- | >= - returns whether its arguments are in descending order | + | |
- | < - returns whether its arguments are in strictly ascending order | + | |
- | <= - returns whether its arguments are in ascending order | + | |
- | xor - returns whether exactly one of its arguments is true; evaluates | + | |
- | only enough arguments from left to right to determine its result | + | |
- | + | ||
- | ===== ALisp Miscellaneous Operators ===== | + | |
- | and - returns #f if any of its arguments is false, or its last | + | |
- | argument if all of them are true; evaluates only enough | + | |
- | arguments from left to right to determine its result | + | |
- | or - returns #f if all of its arguments are false, or the first | + | |
- | one that is true; evaluates only enough arguments from left | + | |
- | to right to determine its result | + | |
- | apply - applies its first argument to the list of arguments given as | + | |
- | its second argument | + | |
- | eval - evaluates its argument | + | |
- | quote - returns its single argument unevaluated | + | |
- | define | + | |
- | its optional second argument or #U if not given | + | |
- | declare | + | |
- | exists and, if it has no value, sets the value its optional | + | |
- | second argument or #U if not given; does not change existing | + | |
- | values | + | |
- | set - changes the value of the local variable named by its first | + | |
- | argument to equal its second argument | + | |
- | undefine | + | |
- | lambda | + | |
- | macro - see the topic 'ALisp macro' | + | |
- | cond - see the topic 'ALisp cond' | + | |
- | let - see the topic 'ALisp let' | + | |
- | let* - see the topic 'ALisp letstar' | + | |
- | throw - see the topic 'ALisp Exceptions' | + | |
- | catch - see the topic 'ALisp Exceptions' | + | |
- | make-error | + | |
- | error-name | + | |
- | compile | + | |
- | giving the symbol passed as the second argument as the | + | |
- | compiled closure' | + | |
- | disassemble - returns a list of the assembly instructions that make | + | |
- | up the body of the compiled closure passed as its first | + | |
- | argument | + | |
- | + | ||
- | ===== ALisp Math Operators ===== | + | |
- | integer? - returns whether or not its argument is an integer | + | |
- | float? | + | |
- | number? | + | |
- | + - returns the sum of all its arguments | + | |
- | - - returns its first argument minus all its other arguments | + | |
- | * - returns the product of all its arguments | + | |
- | | + | |
- | % - return the remainder of dividing its first argument by its second | + | |
- | sqrt - returns the square root of its argument | + | |
- | max - returns the maximum of all of its arguments | + | |
- | min - returns the minimum of all of its arguments | + | |
- | cos - returns the cosine of its argument, given in radians | + | |
- | sin - returns the sine of its argument, given in radians | + | |
- | tan - returns the tangent of its argument, given in radians | + | |
- | acos - returns the arccosine of its argument in radians | + | |
- | asin - returns the arcsine of its argument in radians | + | |
- | atan - returns the arctangent of its argument in radians | + | |
- | + | ||
- | ===== Space Informational Operators ===== | + | |
- | space: | + | |
- | space: | + | |
- | space: | + | |
- | space: | + | |
- | vector of the form #(bearing mark) | + | |
- | space: | + | |
- | space: | + | |
- | it receives an argument that is a two-element | + | |
- | vector of numbers | + | |
- | space: | + | |
- | to docking port numbers and values indicating the | + | |
- | hull that is docked on each port or #f if no hull is | + | |
- | space: | + | |
- | docking door; one of " | + | |
- | " | + | |
- | space: | + | |
- | space: | + | |
- | space: | + | |
- | (hull . port-number) indicating where the hull is | + | |
- | docked | + | |
- | space: | + | |
- | where the current hull is landed | + | |
- | space: | + | |
- | to link point numbers and values indicating the | + | |
- | hull that is linked to each point or #f if no | + | |
- | hull is | + | |
- | space: | + | |
- | from the last update: | + | |
- | #(main batt comp repair prop charge) | + | |
- | Main and batt are the main and battery power pool | + | |
- | availability, respectively; | + | |
- | that was used by components on the hull; repair | + | |
- | is the amount that was used for repairs; prop is | + | |
- | the amount used for propulsion; and charge is the | + | |
- | amount used to charge batteries. | + | |
- | space:repair-crews | + | |
- | as a list of the form | + | |
- | (capacity efficiency men assignment) | + | |
- | space: | + | |
- | space: | + | |
- | space: | + | |
- | space: | + | |
- | space: | + | |
- | space: | + | |
- | space: | + | |
- | otherwise; if an argument is given, set the | + | |
- | transponder status first | + | |
- | space: | + | |
- | space: | + | |
- | space: | + | |
- | space: | + | |
- | space: | + | |
- | space: | + | |
- | space: | + | |
- | space: | + | |
- | the named mount point has set | + | |
- | + | ||
- | ===== Space Action Operators ===== | + | |
- | space: | + | |
- | space: | + | |
- | 2- or 3-element vector argument | + | |
- | space: | + | |
- | returning a boolean success value | + | |
- | space: | + | |
- | to the mount point given by name as its second argument; | + | |
- | " | + | |
- | space: | + | |
- | executing the callback named by its first argument with | + | |
- | the rest of its arguments as arguments to the callback | + | |
- | (see 'Space Devices' | + | |
- | + | ||
- | ===== Space Component Operators ===== | + | |
- | space: | + | |
- | representing the names of mount points and | + | |
- | values of #f for empty mount points or of | + | |
- | type component for occupied mount points | + | |
- | space: | + | |
- | space: | + | |
- | component occupies | + | |
- | space: | + | |
- | otherwise | + | |
- | space: | + | |
- | disabled; #f otherwise | + | |
- | space: | + | |
- | component given as its argument | + | |
- | space: | + | |
- | component given as its argument | + | |
- | space: | + | |
- | as the first argument, named by the second argument | + | |
- | space: | + | |
- | setting given as its argument | + | |
- | space: | + | |
- | it can be changed | + | |
- | space: | + | |
- | given setting is specified | + | |
- | space: | + | |
- | given one argument or a boolean success value of | + | |
- | setting the setting to its second argument if | + | |
- | present | + | |
- | space: | + | |
- | component given as its argument | + | |
- | space: | + | |
- | as the first argument, named by the second argument | + | |
- | space: | + | |
- | command given as its argument | + | |
- | space: | + | |
- | argument, passing any additional arguments to | + | |
- | the command and returning the result of the | + | |
- | command | + | |
- | + | ||
- | ===== Space Commodity Operators ===== | + | |
- | space: | + | |
- | commodity number | + | |
- | space: | + | |
- | as its first argument | + | |
- | space: | + | |
- | commodity, in singular form if the | + | |
- | second argument is not present, is equal | + | |
- | to #f, or is equal to 1 and in plural | + | |
- | form if the second argument is equal | + | |
- | to #t or any number other than 1 | + | |
- | space: | + | |
- | commodity, in kilograms per unit | + | |
- | space: | + | |
- | commodity, in cubic meters per unit | + | |
- | space: | + | |
- | the commodity is volatile | + | |
- | space: | + | |
- | commodity if it is volatile and left | + | |
- | uncontained, | + | |
- | + | ||
- | ===== Space Callback Operators ===== | + |
alisp/frontierspace_operators.1292552787.txt.gz · Last modified: 2018/06/23 00:30 (external edit)