C程序 while (--a!=0)是什么意思void LCM1602_TestBusy(void){ LCM_Dat_Port = 0xFF; LCM1602_RS = 0; LCM1602_RW = 1; LCM1602_EN = 1; while (LCM1602_Busy); LCM1602_EN = 0;}void LCM1602_WriteCMD(uchar dat){ LCM1602_TestBusy(); LCM1602_RS =

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/24 22:07:37
C程序 while (--a!=0)是什么意思void LCM1602_TestBusy(void){ LCM_Dat_Port = 0xFF; LCM1602_RS   = 0; LCM1602_RW   = 1; LCM1602_EN   = 1; while (LCM1602_Busy); LCM1602_EN   = 0;}void LCM1602_WriteCMD(uchar dat){ LCM1602_TestBusy(); LCM1602_RS   =
xTmoV+w`uIZ [RR[M[~D%bRlZP[ @iKV˒/1ɤgͧkE*<9ϹF2( q>}YCWgDdNSrKQ]G¼9TPq˗'/"D>䆅ϐ=+U|CO~xzn WEIT#;^r rnwYP"7%$Đi\gX,)rxӛAz߇l>]F"?N qY4Jp' 516>Ci{&Kzxg9vL҈IO^0Nf}7Ɛ)ɩz]n2_78<'CQn;\, ,A[m& lsi=y>~iJZTL@2)&d%)KOɢ$~Id%fDIAK( _ !1߿DJ{<t)IAI%% b2d7ޙf4/vy]6V?0m|T_Ychų<+p%F f.R;{ٴؾ1z)nmAIC:Qwp1n*֞X5Cdw̓p{{{P3S5ȡC3WH' ճMЄ%cS=$M8^F)T?<zн{w`_'4ÌoSE|ןA^;}%X_ɓ ;mDst*1X{3b ,GM 7I#Czߍg50B)W!%r|R_~$ex[T$|\z KM

C程序 while (--a!=0)是什么意思void LCM1602_TestBusy(void){ LCM_Dat_Port = 0xFF; LCM1602_RS = 0; LCM1602_RW = 1; LCM1602_EN = 1; while (LCM1602_Busy); LCM1602_EN = 0;}void LCM1602_WriteCMD(uchar dat){ LCM1602_TestBusy(); LCM1602_RS =
C程序 while (--a!=0)是什么意思
void LCM1602_TestBusy(void)
{
LCM_Dat_Port = 0xFF;
LCM1602_RS = 0;
LCM1602_RW = 1;
LCM1602_EN = 1;
while (LCM1602_Busy);
LCM1602_EN = 0;
}
void LCM1602_WriteCMD(uchar dat)
{
LCM1602_TestBusy();
LCM1602_RS = 0;
LCM1602_RW = 0;
LCM_Dat_Port = dat;
LCM1602_EN = 1;
LCM1602_EN = 0;
}
void LCM1602_WriteDATA(uchar dat)
{
LCM1602_TestBusy();
LCM1602_RS = 1;
LCM1602_RW = 0;
LCM_Dat_Port = dat;
LCM1602_EN = 1;
LCM1602_EN = 0;
}
void LCM1602_init()
{
LCM1602_WriteCMD(0x38);
LCM1602_WriteCMD(0x0c);
LCM1602_WriteCMD(0x06);
LCM1602_WriteCMD(0x01);
}void LCD_set_xy(unsigned char x,unsigned char y)
{
unsigned char address;
if(y == LINE1)
address = LINE1_HEAD + x;
else
address = LINE2_HEAD + x;
LCM1602_WriteCMD(address);
}
void LCD_write_char( unsigned x,unsigned char y,unsigned char dat)
{
LCD_set_xy(x,y);
LCM1602_WriteDATA(dat);
}
帮我翻译一下,发到我邮箱627080161@qq.com 谢谢

C程序 while (--a!=0)是什么意思void LCM1602_TestBusy(void){ LCM_Dat_Port = 0xFF; LCM1602_RS = 0; LCM1602_RW = 1; LCM1602_EN = 1; while (LCM1602_Busy); LCM1602_EN = 0;}void LCM1602_WriteCMD(uchar dat){ LCM1602_TestBusy(); LCM1602_RS =
;=c)中的&&的
下面是我在VC6中实际编译的程序帮助你理解.
#include <iostream>
using namespace std;
int main()
{
int a=0;
int b=0;
int c=0;
cout<<(a&&b<=c)<<endl;
return 0;
}
这个输出结果是0
很显然,如果是先计算&&的话,a&&b结果是0,它是<=c的,那么结果该为1.但是程序的结果是显示0,所以&&的优先级肯定不会大于<=.
上面是通过实际例子来帮助理解,而理论上的运算顺序我给你总结了最好记得一点:就是&& ||这两个逻辑运算符的优先级是很低的,比它们低的只有三种情况,一是?:(If Then),二是+=,-=,*=...此类运算符,三是逗号,分号,这些用于分割语句的运算符.其他的运算符优先级全部高于逻辑运算符.
这样可以记住了吧.