A Function, as its name suggests, is like a little program that calculates something , ... that simply returns a random number (like the Delphi Random function).
www.delphibasics.co.uk