i have a new question about using the " Serial Communications Header" on reading a number from serial,please help me.

i was using the "port_read_number(portSerial,tmp);" and tmp is a var. how can i get the right number from serial? i have only got 789516.xxxx things. i have tried print DEC,BIN,BYTE,String from the serial device.i have tried &tmp and float tmp or int tmp or long tmp and didn't get the right number.

if i use other serial tool,i can get the wanted number (0-9).what should i do?

thank u~~~