Question
· Nov 19, 2022

Cache data types conversion

Hi Guys,

I've this :

- NodeJS example,

let buf = Buffer.from('02010605166E2A0923100950205450524F424520303030323730', 'hex')

let temper = buf.readInt16BE(7) / 100

 

- Python example,

import binascii

buf = binascii.a2b_hex('02010605166E2A0923100950205450524F424520303030323730')

temper = int.from_bytes(x[7:9],byteorder='big') / 100

 

what would be the equivalent of this using Cache scripts?

 

Thanks Guys 

Product version: Caché 2014.1
Discussion (4)3
Log in or sign up to continue