Recent

Author Topic: Error : RandomRange !  (Read 10090 times)

ZeImp

  • Newbie
  • Posts: 6
Error : RandomRange !
« on: May 24, 2005, 07:17:18 pm »
When I try to build my project I have this error :

Quote
Error: Identifier not found "RandomRange"


The RandomRange function is normally in the Math unit. Somebody can help me : I'm really a newby with Lazarus !

matthijs

  • Hero Member
  • *****
  • Posts: 537
Error : RandomRange !
« Reply #1 on: May 24, 2005, 11:01:09 pm »
It is not in the math unit. :( The math unit is part of fpc. So I'm afraid you have to program it yourself. It is not very difficult:
Code: [Select]

function RandomRange(Low, High: LongInt) : LongInt;
begin
  if High < Low then
    Result := High + Random(High - Low)
  else
    Result := Low + Random(Low -High);
end;
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

ZeImp

  • Newbie
  • Posts: 6
Error : RandomRange !
« Reply #2 on: May 25, 2005, 08:22:24 pm »
Ok. Done. It works.
Thank you.

 

TinyPortal © 2005-2018