intInDataConvert(ucharWR,uintInType,intdata){uchark;//系数if((InType==IN_0_5V)||(InType==IN_1_5V)||(InType==IN_0_5V_N)){k=4;}elseif((InType==IN_0_10V)||(InType==IN_0_10V_...
int InDataConvert(uchar WR,uint InType, int data)
{
uchar k; //系数
if( (InType == IN_0_5V )
||( InType == IN_1_5V )
||( InType == IN_0_5V_N ) )
{
k = 4;
}
else if(
( InType == IN_0_10V )
||( InType == IN_0_10V_N )
||( InType == MV_100 )
||( InType == LNR ) ) //0~10K
{
k = 2;
}
else if( InType == MV_20 )
{
k = 10;
}
else if( InType == MV_75 )
{
k = 10;
}
else if( InType == RES_400 )
{
k = 1;
if(WR)
data >>= 1; //200.00
else
data <<= 1;
}
else
{
k = 1; //4~20mA 等
}
if(WR)
data *= k; //写
else
data /= k ; //读
return(data);
}UART.C(473): error C141: syntax error near ')'
UART.C(503): error C141: syntax error near 'data'
UART.C(504): error C141: syntax error near 'else'
UART.C(512): error C141: syntax error near 'data'
UART.C(513): error C141: syntax error near 'else'
UART.C(515): error C141: syntax error near 'data'
UART.C(526): error C141: syntax error near ')'
请问再编译时出现这个怎么解决,uint uchar 都已经定义过了
展开