I am using Max/MSP to read information I send out via serial. I made a patch which translate this data to me in a message box. The data I receive exists of three characters, mostly numbers (345). But sometimes I receive two numbers and the -character (34-). I want to convert this message box into integers. I want to read the symbols into a numberbox as 345 or in the second example 34 (instead of 34-).
I have no idea how to do this!
I was thinking of putting spaces after each character to seperate them. Then I can compare the last character with the - and if it is true then I must only pack the first two characters into an integer. But I think this method is very time consuming (and I have no idea how to put spaces in between characters!). Does anybody now an easier method?
Thanks in advance