A Name is an identifier. An identifier must have a non-digit as the first character, followed by zero or more non-punctuation, non-whitespace, non-special characters.
- Name Literal
- A Name literal is a colon followed by an identifier.
- Name-String Equivalence
- Any Name can be converted to a
String
without loss of information. The function stringValue ( ) takes a name and returns the corresponding string. The reverse operation is not always possible, since Strings are permitted to contain characters which are not valid in identifiers. The function MakeName ( ) creates a name from a string, and converts invalid characters.
Some functions operate with Names or Strings as arguments. Supplying a Name anywhere a String is permitted, although supposedly supported, is not always supported in practice. The reverse is not the case
- Name Case Handling
- Intent stores and operates with Names as integer keys. Therefore, the capitalization and spelling first seen by the system for an identifier locks in the capitalization for all subsequent usage in the session. When it is necessary to convert these internal numeric names to strings that can be presented to the user, the capitalization of the identifier when it was first stored is used. Subsequent calls to makeName do not affect this behavior. If compilation of a name is part of the system startup sequence, then there is no way to change the capitalization.
Names are not case-sensitive. :ThisIsAName is the same as :thisISaNAME.
- Note for .Net Compatibility
- There is no equivalent for Name in the .Net framework. When Systems work with .Net argument passing, they require that you use Strings . For this reason, Strings are preferable to Names in new code.