f$Message (f$Meldung)
f$Message (f$Meldung)
Output of a system message window on the screen. The window must be confirmed with "OK" or one of the buttons displayed when using a special message type.
The message window can be used for output of error messages as well as for other short advisory messages as desired. A benefit of the system window is that a dialog does not have to be created first. Furthermore, it can also be used within a watching logic (Watch-DT).
The message text can also be spread across multiple lines. The pre-defined parameter "new line" is available for this and is simply written into the message text as text.
Syntax: | f$Message( Title, Messagetext [Type, NameReturn ] ) | |||||
| Argument | Type | Meaning | |||
| Title | String | Text in window heading | |||
| Messagetext | String | Text in the message output | |||
| Type | Integer | Manages the message box buttons: 0 - OK This parameter is optional | |||
| NameReturn | String | Name of a parameter with any data type on which the message box output is written. The parameter name must be encapsulated in single quotes. Result: 1 – OK 7 – No | |||
Result: | - |
Example: | f$Message( 'Attention', 'A position has not yet been assigned' ) |
Hint:
When producing error messages with f$Message, you should possibly also include the name of the DT in which the error has occurred. The DT name can be specified for this with the function f$CallStack so that the correct name is always produced even after renaming or copying the DT:
f$Message(’Error! (’+f$CallStack(1)+’)’,’color ’+color+’ not permitted’) |