7 – PACKAGE
Defines a subroutine package for which subroutine call templates are automatically generated. Format DEFINE PACKAGE package-name
7.1 – Qualifiers
7.1.1 /HELP_LIBRARY
/HELP_LIBRARY=file-spec Specifies the HELP file (.HLB file) where you can find help text for placeholders and tokens defined for this package. If omitted, then no HELP file is associated with the package. LSE applies the default file specification SYS$HELP:HELPLIB.HLB. If you want to access some device or directory other than SYS$HELP, you must supply an explicit device and directory name.
7.1.2 /LANGUAGE
/LANGUAGE=(language1 [, . . . ]) Specifies the languages from which LSE can use package entries. If you do not specify a language, then LSE uses the language of the current buffer. If no language is associated with the current buffer, then an error occurs.
7.1.3 /PARAMETER_EXPAND
/PARAMETER_EXPAND=TPU_procedure_prefix Lets you customize calling sequences. Normally LSE uses a fixed algorithm to produce the appropriate placeholder definitions from the DEFINE PARAMETER command. If the default algorithm is inadequate, then you can supply explicit VAXTPU procedures to produce the DEFINE PLACEHOLDER command that you want. The argument provided with the /PARAMETER_EXPAND qualifier must be the prefix of a VAXTPU procedure name. Whenever LSE expands a parameter, it concatenates this prefix and the current language name, and looks for a VAXTPU procedure by that name.
7.1.4 /ROUTINE_EXPAND
/ROUTINE_EXPAND=TPU_procedure_prefix Lets you customize calling sequences. Normally LSE uses a fixed algorithm to produce the appropriate token and placeholder definitions from the DEFINE ROUTINE command. If the default algorithm is inadequate, then you can supply explicit VAXTPU procedures to produce the DEFINE PLACEHOLDER or DEFINE TOKEN commands that you want. The argument provided with the /ROUTINE_EXPAND qualifier must be the prefix of a VAXTPU procedure name. Whenever LSE expands a routine, it concatenates this prefix and the current language name, and looks for a VAXTPU procedure by that name. For example, if you specify /ROUTINE_EXPAND=my_routine_expand_ and the current language is FORTRAN, then LSE looks for a VAXTPU procedure named my_routine_expand_fortran.
7.1.5 /TOPIC_STRING
/TOPIC_STRING=string Specifies a prefix string to be concatenated to the TOPIC_STRING specified for tokens and placeholders associated with the routine or parameter definitions. If omitted, then the null string is used as the topic string. LSE uses the topic string to look up help text for the package.
7.2 – Parameter
package-name Specifies the name of the package being defined.
8 – PARAMETER
Defines a parameter within a package. Format DEFINE PARAMETER param-name
8.1 – Qualifier
8.1.1 /PACKAGE
/PACKAGE=package-name Specifies the name of the package with which the parameter is associated. You must specify this qualifier.
8.2 – Parameter
param-name Specifies the name of the parameter. This name must be unique among the tokens of any language from which the package is used.
9 – PLACEHOLDER
Creates a placeholder for use with a specific language and establishes the characteristics of that placeholder. Format DEFINE PLACEHOLDER placeholder-name placeholder body END DEFINE or DEFINE PLACEHOLDER placeholder-name /PLACEHOLDER= other-placeholder
9.1 – Qualifiers
9.1.1 /AUTO_SUBSTITUTE
/AUTO_SUBSTITUTE /NOAUTO_SUBSTITUTE (D) Specifies whether you want the next placeholder with this name to be replaced with the same text you typed over the current placeholder.
9.1.2 /DESCRIPTION
/DESCRIPTION=string Specifies a single line of text to be displayed along with the placeholder name when the placeholder name appears in a menu during an EXPAND operation.
9.1.3 /DUPLICATION
/DUPLICATION=specifier /DUPLICATION=CONTEXT_DEPENDENT (D) Specifies the type of duplication to be performed when the placeholder is duplicated (either by expanding it or by typing over it). The specifier is one of the following keywords: o CONTEXT_DEPENDENT If the placeholder is the only item within its segment (that is, if it is either the only item before or the only item within a trailing comment), then LSE duplicates it vertically (see the VERTICAL keyword in this list). Otherwise, LSE duplicates it horizontally. White space may precede or follow the placeholder. o HORIZONTAL LSE places the duplicate immediately to the right of the original. If you specify a separation string, LSE places the string between the original and the duplicate. o VERTICAL LSE places the duplicate on the next line, immediately under the original. If a separation string is specified, LSE places it at the end of the original. If the original placeholder is in the commented segment of the line, then LSE also duplicates the comment delimiters directly underneath the delimiters in the original line. If necessary, LSE adds close comment delimiters to the original line to close a bracketed comment on that line.
9.1.4 /LANGUAGE
/LANGUAGE=language-name Specifies the language associated with the placeholder. By default, the new placeholder is defined for use with the current buffer's language.
9.1.5 /LEADING
/LEADING=string Specifies any leading text to be associated with the placeholder. The ERASE PLACEHOLDER command recognizes this text and erases it along with the placeholder. The leading text must not have any trailing blank spaces because the ERASE PLACEHOLDER command always skips over such spaces.
9.1.6 /PLACEHOLDER
/PLACEHOLDER=other-placeholder Specifies the name of another defined placeholder from which this placeholder inherits its definition. A placeholder defined with the /PLACEHOLDER qualifier may not be named on the /PLACEHOLDER qualifier of any other definition. The /PLACEHOLDER qualifier is mutually exclusive with all other qualifiers except the /LANGUAGE qualifier.
9.1.7 /PSEUDOCODE
/PSEUDOCODE (D) /NOPSEUDOCODE Specifies whether pseudocode can be entered at a specific placeholder. If you specify the /NOPSEUDOCODE qualifier for a placeholder, that placeholder cannot be used with pseudocode.
9.1.8 /SEPARATOR
/SEPARATOR=string Specifies the string that separates each duplication of the placeholder. See the /DUPLICATION qualifier description.
9.1.9 /TOPIC_STRING
/TOPIC_STRING=string Specifies a quoted string that LSE uses to retrieve help text for this placeholder. This string is appended to the string you specify with the /TOPIC_STRING qualifier of the DEFINE LANGUAGE command to form the complete string of topics that LSE uses for looking up the help text for this placeholder.
9.1.10 /TRAILING
/TRAILING=string Specifies any trailing text to be associated with the placeholder. The ERASE PLACEHOLDER command recognizes this text and erases it along with the placeholder. The trailing text must not have any leading blank spaces because the ERASE PLACEHOLDER command always skips over such spaces.
9.1.11 /TYPE
/TYPE=type-specifier /TYPE=NONTERMINAL (D) Specifies the kind of placeholder being defined. The type specifier may be NONTERMINAL, MENU, or TERMINAL.
9.2 – Parameters
placeholder-name Specifies the name of the placeholder being defined. A placeholder name must be unique within a language and can be a quoted string. To redefine an existing placeholder, you must first delete it using the DELETE PLACEHOLDER command. placeholder body Is the body of the placeholder being defined. The interpretation of the placeholder body depends on the type of placeholder. LSE displays the body of a terminal placeholder when you attempt to expand the placeholder. Note that displaying this text does not replace the terminal placeholder and its delimiters. The body of a nonterminal placeholder is the text of the placeholder expansion; when a nonterminal placeholder is expanded, the placeholder name and enclosing delimiters are replaced with the text of the placeholder body. A nonterminal placeholder can have more than one quoted string in each body line. For the expansion of the placeholder, you can set the indentation of each string by using the /INDENTATION qualifier and its associated keywords. Each quoted string in the body line of a nonterminal placeholder can take the qualifier and keywords described in the following section. Nonterminal Body Qualifier /INDENTATION=(keyword1 [,integer1, keyword2]) keyword1 You can specify any of the following options for keyword1: Option Description EXPAND Indents the string to the column of the first character of the nonterminal placeholder being expanded. This is the default value if the first body line is not a null string. CURRENT Indents the string to the indentation of the line containing the placeholder or token. This is the default value if the first body line is a null string. PREVIOUS Indents the string to the indentation of the line before the line containing the placeholder or token. FIXED Indents the string to the specified column. integer1 You can specify any integer for the integer1 option. The default is 0. The integer is added to the column position as specified by keyword1 and adjusts the indentation by that number of columns. The integer can be negative. When the value for keyword1 is FIXED, integer1 specifies the column position at which to put body text; it must be positive. keyword2 You can specify any of the following options for keyword2: Option Description TAB Specifies that integer1 should be interpreted as specifying an adjustment in terms of tab increments rather than columns. Integer1 is multiplied by the tab increment for the buffer before it is added to the column specified by keyword1. SPACE Specifies that integer1 should be interpreted as specifying an adjustment in terms of spaces. This is the default. Note that you cannot specify keyword2 when keyword1 has a FIXED value. If there is more than one quoted string in a body line, a comma must separate the strings. For FORTRAN, if the body line is inside of a comment or there is a tab in the body lines, the /INDENTATION qualifier and associated keywords do not take effect for the first quoted string for each body line. For more information about the use of the /INDENTATION qualifier, see the examples for the EXPAND command. Each line of the body of a menu placeholder represents one option in the menu. An option can be a string of text, a placeholder name, or a token name. If the option is a string of text, it must appear in quotes. If the option is a placeholder name or a token name and does not appear in quotes, that placeholder name or token name appears in uppercase letters in the menu display. For a placeholder name or token name to appear in lowercase letters in a menu, you must enter the placeholder name or token name as a lowercase quoted string. Each line in the body of a menu placeholder may take one or more of the following qualifiers: Menu Body Qualifiers Default /DESCRIPTION=string /[NO]LIST /NOLIST /PLACEHOLDER /TOKEN /DESCRIPTION=string Specifies a description string that is displayed in the right- hand column of the menu. If this qualifier is omitted, then LSE gets the description string from the corresponding definition if the line has either the /TOKEN or the /PLACEHOLDER qualifier. If neither /TOKEN nor /PLACEHOLDER is specified, then the line is a literal string and the value of the /DESCRIPTION string defaults to the empty string. /LIST /NOLIST (D) Specifies whether the delimiters for the placeholder should be list delimiters or not. Use this qualifier only in conjunction with the /PLACEHOLDER qualifier. /PLACEHOLDER Specifies that the name or string is the name of a placeholder in the language. This qualifier is mutually exclusive with the /TOKEN qualifier. /TOKEN Specifies that the name or string is the name of a token in the language. This qualifier is mutually exclusive with the /PLACEHOLDER and /[NO]LIST qualifiers.
10 – ROUTINE
Defines templates for a routine contained within a subroutine package. Format DEFINE ROUTINE routine-name [parameter, . . . ]
10.1 – Qualifiers
10.1.1 /DESCRIPTION
/DESCRIPTION=string Specifies a single line of text to be displayed along with the routine name when the routine name appears in a menu during an EXPAND operation. The string is also passed to the /ROUTINE_ EXPAND procedure, if any. (The default algorithm for producing routine calls from DEFINE ROUTINE commands does not make use of this value.)
10.1.2 /PACKAGE
/PACKAGE=package_name Specifies the name of the package with which the routine is associated. You must specify this qualifier.
10.1.3 /TOPIC_STRING
/TOPIC_STRING=string Specifies a quoted string that LSE uses to retrieve help text for this routine.
10.2 – Parameters
routine-name Specifies the name of the routine. Routine names must be unique within a package. Furthermore, routine names may not conflict with any token names used by LSE for any language using the package. parameter, . . . Specifies the names of the parameters of the routine. These parameters must be defined (using the DEFINE PARAMETER command) prior to expanding an instance of a call on this routine. However, the parameters do not need to be defined prior to the DEFINE ROUTINE command. If you omit this qualifier, then the routine is presumed to have no parameters. The following qualifiers are position-sensitive; they may be used only with the list of parameters to the routine. /BY_VALUE Indicates that the parameter is passed by value. /BY_REFERENCE Indicates that the parameter is passed by address. /BY_DESCRIPTOR Indicates that the address of the parameter descriptor is passed. /[NO]OPTIONAL Specifies whether the parameter is required or optional. The default is /NOOPTIONAL. The /BY_VALUE, /BY_REFERENCE, and /BY_DESCRIPTOR qualifiers are mutually exclusive. These qualifiers are used primarily for languages, such as COBOL, that require explicit specification of passing mechanisms for routine calls.
11 – TAG
Defines the specified tag. Format DEFINE TAG tag-name
11.1 – Qualifiers
11.1.1 /EMPTY
/EMPTY=string-list /EMPTY="None" (D) Specifies one or more strings that indicate that a use of the structured tag has no subtags. If you do not specify the /EMPTY qualifier, then there will be no way to explicitly indicate that an occurrence of the tag is empty. You can always use implicitly empty tags by starting a new top-level tag after the current top- level tag, or by terminating the comment block. You use this qualifier only with the /TYPE=STRUCTURED case.
11.1.2 /KEYWORDS
/KEYWORDS=keyword-list-name Defines the keywords that you can use with this tag. You must specify the keyword-list-name parameter by using the DEFINE KEYWORDS command. If you specify the keyword-list-name with the /KEYWORDS qualifier, the compiler will check that any keywords appearing in your source code as the value of this tag belong to the indicated keyword-list-name. This checking always takes place at compile time; the editor does not check keywords as you type them. If you specify /KEYWORDS=*, this indicates that any keyword is allowed and no checking of keywords is to be done. You use this qualifier only with the /TYPE=KEYWORD case.
11.1.3 /LANGUAGE
/LANGUAGE=language-name Specifies the language associated with the tag being defined. If you do not specify a language, the default is the language of the current buffer.
11.1.4 /SUBTAGS
/SUBTAGS=tag-list Indicates the subtags that can appear in a structured tag. The special case /SUBTAGS=* indicates that any tag is allowed. For example, you would use this special case for the PARAMETERS tag. You use this qualifier only with the /TYPE=STRUCTURED case.
11.1.5 /TYPE
/TYPE=type-keyword Indicates the type of the tag. You can specify any one of the following types: Keyword Type Description TEXT Ordinary text tag (default) KEYWORD List of keywords to be parsed at compile time STRUCTURED Sequence of zero or more subtags
11.2 – Parameter
tag-name Specifies the name of the tag being defined. The tag name must consist only of alphanumeric characters, the dollar sign ($), or the underscore (_), and may contain embedded blanks. Tag names are case-insensitive. If you include embedded blanks, place the name inside quotation marks.
12 – TOKEN
Defines an editing token for use with the EXPAND command. Format DEFINE TOKEN token-name token body END DEFINE or DEFINE TOKEN token-name /PLACEHOLDER= placeholder-name
12.1 – Qualifiers
12.1.1 /DESCRIPTION
/DESCRIPTION=string Specifies some text to be displayed along with the token name when the token name appears in a menu during an EXPAND operation or in a SHOW TOKEN display.
12.1.2 /LANGUAGE
/LANGUAGE=language-name Specifies the language associated with the token. By default, the token is defined for use with the current language.
12.1.3 /PLACEHOLDER
/PLACEHOLDER=placeholder-name Specifies the name of a defined placeholder that expands in place of the token. The token gets its description, topic string, and body from the defining placeholder. Note that the /PLACEHOLDER qualifier is mutually exclusive with the /DESCRIPTION and /TOPIC_STRING qualifiers and the END DEFINE command must not be used on the DEFINE TOKEN command when /PLACEHOLDER is specified. No token body is specified with the /PLACEHOLDER qualifier.
12.1.4 /TOPIC_STRING
/TOPIC_STRING=string Specifies a quoted string that LSE uses to retrieve help text for this token. This string is appended to the /TOPIC_STRING qualifier specified in the DEFINE LANGUAGE command to form the complete string of topics that LSE uses to look up the help text for this token.
12.2 – Parameter
token-name Specifies the name for the token being defined. Each token for a particular language must have a unique name. Token and alias names must not conflict. A token name can be any character including a blank space, but not a leading or trailing space. token body Is the text of the token expansion. When the token is expanded, the token name is replaced with the text of the token body. A token can have more than one quoted string in each body line. For the expansion of the token, you can set the indentation of each string by using the /INDENTATION qualifier and its associated keywords described in the following section: Each quoted string in the body line of a token can take the qualifier and keywords described in the following section. Nonterminal Body QualiDefaults /INDENTATION=(keyword1 [,integer1, keyword2]) keyword1 You can specify any of the following options for keyword1: Option Description EXPAND Indents the string to the column of the first character of the nonterminal placeholder being expanded. This is the default value if the first body line is not a null string. CURRENT Indents the string to the indentation of the line containing the placeholder or token. This is the default value if the first body line is a null string. PREVIOUS Indents the string to the indentation of the line before the line containing the placeholder or token. FIXED Indents the string to the specified column. integer1 You can specify any integer for the integer1 option. The default is 0. The integer is added to the column position as specified by keyword1 and adjusts the indentation by that number of columns. The integer can be negative. When the value for keyword1 is FIXED, integer1 specifies the column position at which to put body text and must be positive. keyword2 You can specify any of the following options for keyword2: Option Description TAB Specifies that integer1 should be interpreted as specifying an adjustment in terms of tab increments rather than columns. Integer1 is multiplied by the tab increment for the buffer before it is added to the column specified by keyword1. SPACE Specifies that integer1 should be interpreted as specifying an adjustment in terms of spaces. This is the default. Note that you cannot specify keyword2 when keyword1 has a FIXED value. If there is more than one quoted string in a body line, a comma must separate the strings. For FORTRAN, if the body line is inside of a comment or there is a tab in the body lines, the /INDENTATION qualifier and associated keywords do not take effect for the first quoted string for each body line. For more information about the use of the /INDENTATION qualifier, see the examples for the EXPAND command.