14 lines
385 B
Text
14 lines
385 B
Text
Module Jensen`s_Device {
|
|
double i=0
|
|
Report Lazy$(1/i) ' display the definition of the lazy function
|
|
Function Sum (&i, lo, hi, &f()) {
|
|
double temp=0
|
|
For i= lo to hi {
|
|
temp+=f()
|
|
}
|
|
=temp
|
|
}
|
|
Print Sum(&i, 1, 100, Lazy$(1/i))==5.1873775176392 ' true
|
|
Print i=101 ' true
|
|
}
|
|
Jensen`s_Device
|