如此显示怎么改善?

[复制链接]
2183|2
 楼主| gaohq 发表于 2009-3-13 17:17 | 显示全部楼层 |阅读模式
/*显示一个字符串此串字符有可能超过16个但都在32个之内
同时有几个字符串
uchar str3[]="The AAAAAAAA value is :";
uchar str5[]="The current bbbbbbbb is :";*/
void writstring(uchar string[])
{
    uchar i;
    init();
    possit(0x00);
    i=0;
    while((string!='\0')||(i<=16))
        {
            write_dat(string);
            i++;
        }
    possit(0x40);
    while((string!='\0')||(i<=32))
        {
            write_dat(string);
            i++;
        }
    
}
主程序
main()
{
    writstring(str3);
    while(1);
    
}
显示结果是
The AAAAAAAA val
The current bbbb
其实我只想显示 The AAAAAAAA value is :
 楼主| gaohq 发表于 2009-3-15 15:32 | 显示全部楼层

沉了

问题其实就是:要显示一个不定长度的字符串,1602一行显示不了,要两行显示
比如我定义了两个字符数组
str1[]="the aaaaaaa bbbbbbb is :
str2[]="the cccccccdddddddd is not :"
我用上面的程序 writstring(str1);
后显示结果却是
the aaaaaaa bbbb 
bbb is :the cccc
我只想让它显示
the aaaaaaa bbbb 
bbb is :
还请各位高人不惜赐教,谢谢!!!
林粼粼 发表于 2009-3-15 23:49 | 显示全部楼层

是与的关系

您需要登录后才可以回帖 登录 | 注册

本版积分规则

378

主题

3767

帖子

5

粉丝
快速回复 在线客服 返回列表 返回顶部