ecl-logo Documentation

DefineConstant

DefineConstant[sym,val]out

defines a protected constant value.

DefineConstant[sym,val,Usage]out

defines a protected constant value with the given Usage definition.

Details

  • Will unprotect and protect the symbol so that the definition can be re-evaluated without throwing errors.
  • Input
    Output
    Attributes
  • HoldAll

Examples

Basic Examples  (3)

Define a new constant with a value of π:

Redefine a constant with a new value "Brad":

Define a constant with a specified Usage message:

Attributes  (1)

HoldAll  (1)

All arguments are held so that on initialization the correct value is used: