
The message statement can be used to include arbitrary messages in the output of the driver. The format of a message statement is given below.
message <file number>,"<message>",<expression list>
Windows Format:
message @<file name>,"<message>",<expression list>
Or:
message |<DLL name>,"<message>",<expression list>
Or:
message "<message>",<expression list>
In the second format, the first character is the vertical mark, the shift of the back-slash. The third format causes messages to be displayed in the WinFhdl message window.
The file number is the same as that found in the read and write statements. It must be an expression that evaluates to a number from zero through ten inclusive. If zero is specified, the message is directed to the standard output of the UNIX command used to invoke the simulator. File numbers from 1 through 10 refer to the arguments of the command used to invoke the simulator. The specified argument is treated as a file name and opened for output. The message is written on this file.
The message is arbitrary text enclosed in quotes. The message will appear on a separate line in the specified file. It will be preceded by the characters "* " (asterisk, blank) to distinguish it from monitor output. If the message contains the character "%" substitution of expression values will be performed in the same manner as for the C function "printf" (s.v.). Expression values are used in left-to-right order just as for printf. Any variable conversions acceptable to printf are acceptable to the message statement. The following is an example.
message 0,"The values are %d and %d (%8.8x and %8.8x in hex)",a+1,b,a+1,b