What is the number being sent by the other device?
Is it a single byte, or a 4-byte long-integer, or what?

If you are trying to read a single BYTE, then use
Code:
// var tmp;   //assumed...
   BYTE tmp_byte=0;
   port_read_bytes(portSerial, &tmp_byte, 1);
   tmp = tmp_byte;



If you are trying to read a long-integer (ie "9, 0, 0, 0" )
Code:
// var tmp;   //assumed...
   long tmp_long=0;
   port_read_number(portSerial,&tmp_long);
   tmp = tmp_long;




"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial