Rewrited FORMAT function from repo https://github.com/public-domain/cmucl
Not included in the standard JSCL
distribution
Only for Windows/Electron platform. How to use JSCL
on the Electron
, see https://github.com/vlad-km/how-to/blob/main/jscl-electron.txt
FORMATTER function
* is also included in the release
~A
~S
~C
~W
~D
~B
~O
~X
~R
~F
~P
~%
~&
~~
~#\newline
~*
~?
~{
~;
~^
~[
~/
- file `./rep.txt'
(load "./repo/format/src/format.lisp")
;; or
(require "./format.js")
(load "./repo/format/src/pp/format-pp.lisp")
(load "./repo/format/src/pp/pp.lisp")
(require "./format.js")
(jscl::fset 'format (fdefinition '%das!format))
;; after the command, `DAS!FORMAT' function is called as `FORMAT'
;;`JSCL FORMAT' now is available for use as `JSCL::!FORMAT'
;; (format t "~5&Hello~5%") - ANSII FORMAT
;; (jscl::!format t "~&Hello~&") - JSCL FORMAT
(setq *f1 (formatter "~5&Hello ~a~%"))
(format t *f1 :|any name|)
Public domain