基于VB的数值积分算法 '这里的第一个Public为积分函数mathzcm段 Public Function mathzcm(ByVal a!,ByVal b!,ByVal n%)As Single Dim sum!,h!,x! h=(b-a)/n sum=(f(a)+f(b))/2 For i=1 To n-1 x=a+i*h sum=sum+f(x) Next i mathzcm=sum*h End Function '另行定义自己需要的a,b,n的值…… Public Function
Micro Series 8051 C-Compiler V4.10A/DOS (c) Copyright IAR Systems 1991 Usage: icc8051 {} {} Sourcefile: 'C' source file with default extension: .c Environment: QCC8051 Options (specified order is of no importance): -o file Put object on: -Oprefix
1."c" not an argument in function sum 该标识符不是函数的参数 2.array bounds missing ] in function main 缺少数组界限符 "]" 3.Array size too large in function main 数组规模太大 4.bad file name format in include directive 在包含指令中的文件名格式不正确. 5.Call of non-function in function ma