Information

This site will undergo a brief period of maintenance on Thursday, 23 April at 2:30 AM Central/1:00 PM IST. During a 30 minute window, site availability may be intermittent.

Information
Important This documentation space contains information about PATROL Agents when deployed in a TrueSight Operations Management environment. If you are a BMC Helix Operations Management user, see PATROL Agent for BMC Helix Operations Management 24.3.01.

Numeric Constants


Although the internal representation of an integer or floating-point constant is a string, these constants do not need to appear inside quotation marks in PSL scripts. Integer, floating-point, and hexadecimal constants can be used in the same way as in the C programming language. An example follows:

 {{x = 3;}} {{pi = 3.14159;}}

The result of arithmetic or math functions is stored in a string floating-point format, even when operands are integers and the result is an integer. Use the PSL function printf() or sprintf() if you need to display the result as an integer.

Hexadecimal literals

Hexadecimal numbers may be used as literals in PSL code, and are identified by using 0x as a prefix. Do not use quotation marks around hexadecimal literals. A value appearing in quotation marks will be interpreted as a string, not as the equivalent number. An example follows:

 {{flags=0x00ff; #Hexadecimal literal stored as "255"}} {{flags="0x00ff"; #Non-numeric string value stored as "0x00ff"}}


Hexadecimal numbers are represented internally as character strings of their decimal equivalent. To return a number in hexadecimal notation, use the PSL function printf() or sprintf().

Where to go from here

PSL-Data-Types-and-Objects

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC PATROL Agent 24.3