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.atof

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

value =  "lp.atof('text_number');

Description

Convert a character string in a double number

Parameters

‘text_number'                A number defined in a character string

Return Values

value : The result of the operation as a double

Return nil if an error occurs

Example

value,buffer=lp.Get(lp_host,'ipinreceives.0');
lp.Print("Receive : ",value,"\n");
a=lp.atof(buffer)*2;
lp.Print("Receive * 2 : ",a);

ascii to double in LUA

 


www.loriotpro.com