ecl-logo Documentation

DefineUsage

DefineUsage[f,usageRules]out

sets the Usage for f from usageRules. Also writes Information for f.

Details

    Input
    Output
    Attributes
  • HoldFirst
  • Messages
  • DeprecatedFormDefining usage with the form Usage[`1`] (in SLL package: `2`) is deprecated. Use DefineUsage instead.
    InvalidUsageField`1` is not a valid usage field.
    MissingFieldUsage definition for function `1` missing usage field `2`
    NoDefaultForRequiredUsageFieldsThe usage field `1` does not have a default. It is required.
    RuleDelayedRequiredThe usage field `1` is required to be a RuleDelayed.
    UnknownUsageFieldThe function `1` has an unknown usage field definition `2`.
    UsageFieldPatternErrorThe function `1` has a usage field definition `2` that does not match its pattern.

Examples

Basic Examples  (4)

Set some Usage fields (using the current Command Builder ready format):

Set some Usage fields (using the legacy format):

Sets the Information (using the legacy format):

Set full Usage (using the legacy format):

Additional Examples  (1)

Set some Usage fields (using the current Command Builder ready format):

Attributes  (1)

HoldFirst  (1)

Expressions are held before evaluation:

Messages  (8)

BadUsageFormat  (1)

Specify an illegal Usage Type:

DeprecatedForm  (1)

FIXME:

InvalidUsageField  (1)

FIXME:

MissingField  (1)

Some fields are required:

NoDefaultForRequiredUsageFields  (1)

FIXME:

RuleDelayedRequired  (1)

Some fields must be RuleDelayed:

UnknownUsageField  (1)

There are errors given unexpected usage fields:

UsageFieldPatternError  (1)

There are errors given things that don't match expected patterns: