Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Messages Statement Summary

Messages is a nonterminal, metalanguage statement that can only be used within MetaLanguage command scripts as the first statement in that script. In particular, it must precede the Language statement itself. The Messages statement defines the error messages used by gmBasic when it processes statements, including its own language definition.

The Messages statement has no attributes.

The substatements of the Messages statement are as follows:

Substatement Description
Message This substatement defines an individual message for a specified message number.


Message Substatement Summary

Message is a terminal, metalanguage substatement that occurs within the Messages statement. This substatement defines a message to be associated with a message number used by gmBasic when it needs to display it. The numbers of the messages may not be changed, but their text may be.

The attributes of the Message substatement are as follows:

Attribute Description
Id This integer attribute is the numeric identifier of the message desired by gmBasic. These messages are classified in numeric ranges as described below.
Text This string attribute contains the actual message to be associated with the number. Many of the messages have parameters that are to be included in the messages. These are placed in the message text as "%nd" or %nv" when "n" is the parameter number and "d" means a string value and "v" means an integer value.

The actual messages can be found in the file Messages.xml. Their general characteristics are discussed here.

Messages in the 100 to 200 range are simple process/informative messages that typically have one or two external strings (%1d,%2d) or values (%1v, %2v) associated with them. They are all handled by the simple message handler methods and have no preamble messages associated with them.

Messages in the 1001-1999 range are gmSL syntax errors and general scripting problems. Message 1000 is the preamble message for these errors. By convention:

Param Description
%1v is the error number itself, also the message number
%1d is the optional string passed to the message handler
%2d is the name of the Xml file being processed

Messages in the 2001-5999 range are VB6 syntax warnings. Message 2000 is the preamble message for these warnings. By convention:

Param Description
%1v is the warning number itself, also the message number
%2v is the statement number in the source file
%3v is the starting character position of the error
%1d is the Source filename
%2d is the last encountered token string
%3d is the source record beginning at the point the error was detected

Messages in the 4001-4999 range are IDL syntax errors. Message 4000 is the preamble message for these errors. By convention:

Param Description
%1v is the error number itself, also the message number
%2v is the statement number in the IDL file
%3v is the starting character position of the error
%1d is the IDL filename
%2d is the last encountered token string

Messages in the 5001-5999 range are VB6 syntax errors. Message 5000 is the preamble message for these errors. By convention:

Param Description
%1v is the error number itself, also the message number
%2v is the statement number in the source file
%3v is the starting character position of the error
%1d is the Source filename
%2d is the last encountered token string
%3d is the source record beginning at the point the error was detected


Table of Contents

  • No labels