mlyacc/examples/pascal/test/t6.p
raw| 1 | program this (output) |
| 2 | procedure addcor; |
| 3 | var bins,start,i,last : integer; level : real; |
| 4 | begin bins := trunc((r1+r2)*maxcor); |
| 5 | if bins < 1 then bins := 1; |
| 6 | start := round(d*maxcor) - bins div 2; |
| 7 | level := mm/bins; |
| 8 | last := start+bins; if last>maxcor then last := maxcor; |
| 9 | corfarray[start] := corfarray[start]-level; |
| 10 | corfarray[last] := corfarray[last]+level; |
| 11 | end; |