Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Lisp
(defparameter +planet+ "Earth")

This is not technically constant, but is the most common way of doing it. The third-party library Alexandria provides define-constant that could define a constant and one could also use define-symbol-macro from the standard library
planet : constant String := "Earth";

New implementation...
< >
programming-idioms.org