📄 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 + -