LUALoriotPro WEB site

LoriotPro scripting documentation
Extensions for LUA language

Table of contents Search function

Print the current page Mail this  link UTUBE Channel version française

lp.ascii_ui64ToHex

LoriotPro has extended the LUA sripting language by providing its own LUA libraries. The new functions provided are dedicated to the creation of monitoring and SNMP automation application.

Syntax

'0xyyyyyyyy' = lp.ascii_ui64ToHex('value1');

Description

Convert an unsigned 64 bits number defined in a character string in its hexadecimal value (base 16)

Parameters

value1 - An usigned 64 bits number defined in a character string

Return Values

value : The result of the operation as a double

Return nil if an error occurs

buffer : The result of the operation as a character string representing an hexdecimal value (example : '0xA14F20BC').  

Return nil if an error occurs

Example

buffer = lp.ascii_ui64ToHex('255');
lp.Print(buffer,"\n");
buffer = lp.ascii_ui64ToHex('65535');
lp.Print(buffer,"\n");
buffer = lp.ascii_ui64ToHex('15151515151515');
lp.Print(buffer,"\n");

64bits to hexadecimal in LUA

 


www.loriotpro.com