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.XOR - Perform a logical XOR

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.XOR(value1 , value2); 

Description

The lp.XOR LUA function performs a logical XOR between two values.

Parameters

value1 - a number

value2 - a number

Return Values

value : value of the result

buffer : An integrer value fo uint64 type in a character string format

Return nil if an error occurs

Example

a=lp.XOR(128,80)

lp.Print(a,"\n")

a=lp.XOR(80,80)

lp.Print(a,"\n")

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

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

Le résultat :

XOR in LUA script

 

 


www.loriotpro.com