Si chiama random anche in delphi.
Devi passargli un valore(n) di tipo intero,dopodichè ti restituirà un valore compreso tra 0 e n-1