Skip to content

Instantly share code, notes, and snippets.

@judasRV
Created December 9, 2017 06:46
Show Gist options
  • Save judasRV/e94203dd5fcf5c838455400d6825b2b6 to your computer and use it in GitHub Desktop.
Save judasRV/e94203dd5fcf5c838455400d6825b2b6 to your computer and use it in GitHub Desktop.
;; come usare il (format )
;~ (setq *stmp-case* :capitalize)
(format t " Il mio nome e ~a ~% " "Jakob")
(format t " Numero con virgole ~:d ~% " 1000000)
(format t " PI con 5 personaggi ~5f ~% " 3.141593)
(format t " PI con 4 personaggi ~4f ~% " 3.141593)
(format t " Valore senza segno ~d ~% " 3.141593)
(format t " 10 porcentuale ~,,2f ~% " .10)
(format t " 10 Pezo ~,,2f ~% " 10)
(format t " hex valore ~x ~% " 250)
;; maiuscole e minuscole
(let ((cibo '(uovo pane burro carota)))
(format t " ~{~A~^, ~}.~%" cibo)
(format t " ~@(~{~A~^, ~}~).~%" cibo)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment