03-20-2012 05:20 AM
Can anyone tell me if there is any quick way to cast or convert a binary representation to a (decimal) integer value?
for example, my UI creates a text string in the form "1111" and I want to pass this to a function as an integer (decimal) value of 15 ....
Obviously I could code a function to do the conversion, but I was wondering if there is any built-in function, or method of casting the string to an integer value ... I haven't been able to find any information on this either here or in the LSL wiki ...
03-20-2012 05:52 AM
Hi, the only native representations for LSL are decimal and hex. There is no parsing built in for binary or octal.
03-20-2012 06:20 PM
Thanks Cerise, for confirming that I should stop looking for it .... and thanks Rolig for pointing me at that function and saving me having to create one