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

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, ‘buffer’ = lp.AND(value1 , value2);

Description

The LUA lp.AND function performs a logical and between two values.

Parameters

Value1                 a number

Value2                a number

Return Values

value : the result of the logical and

Return nil if an error occurs

buffer : an integer of uint64 type displays as a character string.

Return nil if an error occurs

Example

Example of code using lp.AND

a=lp.AND(128,80)

lp.Print(a,"\n")

a=lp.AND(80,80)

lp.Print(a,"\n")

a,b=lp.AND(0xFF,0xAB)

lp.Print(string.format("0x%x",a),"\n")

logical and

 

 


www.loriotpro.com