MessageLog
From MultiCharts
Displays one or more specified expressions in the PowerLanguage Editor Output Log. Any combination of string, true/false, numerical series, or numerical expressions can be specified.
Usage
MessageLog(Expression1,Expression2,etc.)
Parameters
- Expression - a string, true/false, numerical series, or numerical expression; any number of valid expressions, separated by commas, can be used.
- A string expression must be enclosed in quotation marks, for example MessageLog("Hello World!").
- A numerical expression can be formatted to specify the minimum number of characters, including the decimal point, and the number of decimal places, to be used for the output:
- Expression:C:D
- Where:
- C - minimum number of characters,
- D - number of decimal places.
- Where:
- Expression:C:D
- The default output format for a numerical expression is two decimal places and a minimum of seven characters.
- If the number of decimal places in the numerical expression is more than the specified number, the value will be will be rounded off to the specified number of decimal places.
- If the number of characters in the output is less than the specified minimum, leading spaces will be added to bring the output to the specified minimum value.
Notes
- MessageLog is the equivalent of Print.
Example
MessageLog(.1);
Will display 0.10 in the PowerLanguage Editor Output Log, with three leading spaces inserted.
MessageLog(1.555555:6:3);
Will display 1.556 in the PowerLanguage Editor Output Log, with one leading space inserted.
MessageLog("Current Time is:",CurrentTime:5:0);
Will display the string expression "Current Time is:", followed by the output of the CurrentTime, with one leading space inserted, in the PowerLanguage Editor Output Log.