hcl/README.md

76 lines
731 B
Markdown
Raw Normal View History

# HCL - Hybrid Command Language
## Language Syntax
2018-03-17 07:31:24 +00:00
A HCL program is composed of more expressions.
## Keywords
2018-04-06 15:29:34 +00:00
* nil
* true
* false
## Special Form Expression
* and
* break
* defun
* do
* elif
* else
* if
* lambda
* or
* return
* set
* until
* while
## literals
2018-03-17 07:31:24 +00:00
* integer
* character
* small pointer
* error
* string
* dictionary
* array
* byte array
## Builtin functions
2018-04-06 15:29:34 +00:00
* not
* _and
* _or
2018-03-17 07:31:24 +00:00
* eqv?
2018-04-06 15:29:34 +00:00
* eql?
2018-03-17 07:31:24 +00:00
* eqk?
2018-04-06 15:29:34 +00:00
* nqv?
* nql?
* nqk?
* sprintf
2018-03-17 07:31:24 +00:00
* printf
* _+_
* _-_
* _*_
2018-04-06 15:29:34 +00:00
* mlt
* /
* quo
* mod
* sqrt
* bit-and
* bit-or
* bit-xor
* bit-not
* bit-shift
## Defining a function
(defun function-name (arguments)
| local variables |
function body
)
(set function-name (lambda (arguments)
| local variables |
function body
)