FUNCTION linear ( relativeProgress : real) : real; FUNCTION sine ( relativeProgress : real) : real; function bulge ( relativeProgress : real) : real; // ^ // | declarations // //-------------------- // // | implementations // V {=================================} FUNCTION {=================================} {====} linear (relativeProgress : real) {====} {====} : real; {====} {== the default progress function ==} {}begin {} result := relativeProgress; {}end; {} {==} {==} { linear } {=======-------------------------- FUNCTION --------------------------=======} {=================================} FUNCTION {=================================} {====} sine (relativeProgress : real) {====} {====} : real; {====} {== a soft-finish progress function ==} {}begin {} result := sin(relativeProgress*pi/2); {}end; {} {==} {==} { sine } {=======-------------------------- FUNCTION --------------------------=======} {=================================} FUNCTION {=================================} {====} bulge (relativeProgress : real) {====} {====} : real; {====} {a progress function that goes to 1.75, whent the interpolation is 75% conplete} {==}var a, b, c, x : real; {}begin x := relativeProgress; a := -3 - 1/3; b := 4 + 1/3; c := 0; result := a * x * x + b*x + c; form1.caption := floatToStr(result); {}end; {} {==} {==} { bulge } {=======-------------------------- FUNCTION --------------------------=======}