?? word2char.c
字號:
#ifndef _COMMON_DEFINE
#include "COMMON.c"
#endif
void WORD2CHAR(WORD in,CHAR *out,BYTE l);
void WORD2CHAR(WORD in,CHAR *out,BYTE l)
{
data BYTE temp,i;
bit f=0;
i=0;
if (in>9999)
{
temp=in/10000;
in-=(temp*10000);
if (l>4) {out[i++]=temp+48;f=1;}
}
else
if (l>4) out[i++] = f ? '0' : ' ';
if (in>999)
{
temp=in/1000;
in-=(temp*1000);
if (l>3) {out[i++]=temp+48;f=1;}
printf("%bd\n",i);
}
else
if (l>3) out[i++] = f ? '0' : ' ';
if (in>99)
{
temp=in/100;
in-=(temp*100);
if (l>2) {out[i++]=temp+48;f=1;}
}
else
if (l>2) out[i++] = f ? '0' : ' ';
if (in>9)
{
temp=in/10;
in-=(temp*10);
if (l>1) {out[i++]=temp+48;f=1;}
}
else
if (l>1) out[i++] = f ? '0' : ' ';
temp=in;
out[i++]=temp+48;
out[i]=0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -