Plantilla ppt de plástico gratuita
Antes de enviar, convierta las celdas de la matriz de enteros de envío en una matriz ASCII y luego envíelas de acuerdo con la función de envío general.
void InttoChar (uint IntNumber)
// -
//Nombre:void intto char(int int número)
/ /Func. :Convertir entero a matriz de caracteres ASCII
// Char.
:IntNumber El número que se convertirá a caracteres ASCII
// -
{
if(int number & lt; 10)
{
asciarray[0]= int número+0x 30;
asciarray[1]= 0x 20;
asciarray[2]= 0x 20;
asciarray[3]= 0x 20;
asciarray[4]= 0x 20;
Retorno;
}
if(int número & lt; 100)
{
asciarray[0]= int número/10x 30;
asciarray[ 1 ]= número int % 10x 30;
asciarray[2]= 0x 20;
asciarray[3]= 0x 20;
asciarray[ 4 ]= 0x 20;
Retorno
}
if(int número & lt; 1000)
{
asciarray[0]= número int/100x 30;
asciarray[1]= número int % 100/10x 30;
asciarray[2] = int número % 10x 30;
asciarray[3]= 0x 20;
asciarray[4]= 0x 20;
Retorno; p >
}
if(int número & lt; 10000)
{
asciarray[0]= int número/1000x 30;
asciarray[1]= número int % 1000/100x 30;
asciarray[2]= número int % 100/10x 30;
asciarray[3]= número int % 10x 30;
asciarray[4]= 0x 20;
Retorno;
}
Otro
{
asciarray[0]= número int/10000x 30;
asciarray[1]= número int % 10000/1000 + 0x 30;
asciarray[2]= número int % 1000/100x 30;
asciarray[3]= número int % 100/10x 30; p >
asciarray[4]= int número % 10x 30;
Retorno;
}
}