数组
可不可以把每个学生的成绩记录转为记录,然后处理记录,求记录的各个成绩的大小。。。
2018-01-16 15:12

2018-01-16 17:06
2018-01-16 17:08
程序代码:Create Table testscore (姓名 C(10),物理 N(3),化学 N(3),生物 N(3),政治 N(3), ;
历史 N(3),地理 N(3),语文 N(3),数学 N(3),英语 N(3))
Insert Into testscore Values ('张三',90,98,93,97,100,98,130,130,130)
Insert Into testscore Values ('李四',72,96,82,91,98,68,130,130,130)
Dimension aScoreCourse[7,2]
Scan
aScoreCourse[1,1]=Trim(姓名)
aScoreCourse[1,2]=Trim(姓名)
For i=2 To 7
aScoreCourse[i,1]=Evaluate(Field(i))
aScoreCourse[i,2]=Field(i)
Next
Asort(aScoreCourse,3,-1,1)
For k=1 To 7
ShowScore=Iif(k=1,'aScoreCourse['+Transform(k)+',1]',ShowScore+',aScoreCourse['+Transform(k)+',1]')
ShowCourse=Iif(k=1,'aScoreCourse['+Transform(k)+',2]',ShowCourse+',aScoreCourse['+Transform(k)+',2]')
Next
?&ShowScore
?&ShowCourse
Endscan
[此贴子已经被作者于2018-1-16 17:47编辑过]
2018-01-16 17:35
2018-01-17 08:14
2018-01-17 08:33
2018-01-17 08:34
2018-01-17 09:35

2018-01-17 11:56
2018-02-18 08:13