标题:systax error on taken "=" ,Expression expected after this token ...
只看楼主
bao
Rank: 1
等 级:新手上路
帖 子:40
专家分:0
注 册:2008-5-24
 问题点数:0 回复次数:1 
systax error on taken "=" ,Expression expected after this token
jsp的一个文件中 报错
<%!

double c1;
double k1;
double c2;
double k2;
double MM;

double TDEV;
%>
<% String type=request.getParameter("type");
double num=Double.parseDouble(request.getParameter("num"));
if(type.equals("you")){
c1=2.4;
k1=1.05;
c2=2.5;
k2=0.38;
}
if(type.equals("ban")){
c1=3.0;
k1=1.12;
c2=2.5;
k2=0.35;
}
if(type.equals("qian")){
c1=3.6;
k1=1.20;
c2=2.5;
k2=0.32;
}
MM=c1*Math.pow(num,k1);
TDEV=c2*Math.pow(MM,k2);
if(2<num<8){
MM=[68+(num-2)*(65-68)/(8-2)]/100*MM; //此处和下面的每个等号都有报错,报错信息为systax error on taken "=" ,Expression expected after this token

TDEV=[63+(num-2)*(59-63)/(8-2)]/100*TDEV;
}
if(8<num<32){
MM=[65+(num-8)*(62-65)/(32-8)]/100*MM;
TDEV=[59+(num-8)*(55-59)/(32-8)]/100*TDEV;
}
if(32<num<128){
MM=[62+(num-32)*(59-62)/(128-32)]/100*MM;
TDEV=[55+(num-32)*(51-55)/(128-32)]/100*TDEV;
}
%>
搜索更多相关主题的帖子: token Expression expected systax 
2008-07-23 21:40
bao
Rank: 1
等 级:新手上路
帖 子:40
专家分:0
注 册:2008-5-24
得分:0 
把【】改为()就可以了
 还有个错误 2<num<8改为2<num&&num<8
2008-07-24 10:44



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-225006-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.495555 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved