Hello again, hope everybody´s fine!

I have some little problem here. I am receiving serial data (numbers) and I need to compare them (is it "compare them" well written?), anyways, I need to do so, but it seems that when I try to compare this data, it is taken as ascii code, so I always get the same result no matter what the data is. Is there a way to make a kind of cast to convert this ascii data into numeric data so I can do my comparison?
Thank all of you and special thank to Adam who´s I´ve been receiving too much help from.

Armando.