const one = 1
# Constants in Ruby being with a capital letter. Will throw a warning or error, depending on runtime settings.
Name = "John"
# Not a constant
name = "John"
const FOO = 123;
const void* BAR = null;
constants
Opened = 1
Closed = 2
const PI = 3.14159265359
Languages with Constants include Java, JavaScript, C, C++, PHP, Ruby, C#, Go, Rust, Kotlin, TypeScript, Julia, Objective-C, Dart, F#, Groovy, Chapel, SystemVerilog, C3, Speedie, Jule, Angelscript, Pizza, Apex, Eclipse Command Language, C2, nimrod, Oracle Java, Deesel, Tick C, cooC
Languages without Constants include progsbase
This question asks: Does the language have a way to declare constant compile time variables?
Read more about Constants on the web: 1.
HTML of this page generated by Features.ts