Lazarus RandomRange function
I have a problem with RandomRange, this is the code:

    procedure TForm1.FormCreate(Sender: TObject);
    var
    i : Integer;

      function RandomRange(const AFrom, ATo: Integer): Integer;
      begin
      Result := RandomRange(15,20);
      Case Result of
      15 : ShowMessage('message1');
      16 : ShowMessage('message2');
      17 : ShowMessage('message3');
      18 : ShowMessage('message4');
      19 : ShowMessage('message5');
      20 : ShowMessage('message6');
      end;
    end.


When I try to compile, I get the following error:

    unit1.pas(46,30) Hint: Parameter "AFrom" not used
    unit1.pas(46,37) Hint: Parameter "ATo" not used
    unit1.pas(57,4) Fatal: Syntax error, ";" expected but "." found


What could it be? thanks
Lazarus RandomRange function
===

I have a problem with RandomRange, this is the code:

    procedure TForm1.FormCreate(Sender: TObject);
    var
    i : Integer;

      function RandomRange(const AFrom, ATo: Integer): Integer;
      begin
      Result := RandomRange(15,20);
      Case Result of
      15 : ShowMessage('message1');
      16 : ShowMessage('message2');
      17 : ShowMessage('message3');
      18 : ShowMessage('message4');
      19 : ShowMessage('message5');
      20 : ShowMessage('message6');
      end;
    end.


When I try to compile, I get the following error:

    unit1.pas(46,30) Hint: Parameter "AFrom" not used
    unit1.pas(46,37) Hint: Parameter "ATo" not used
    unit1.pas(57,4) Fatal: Syntax error, ";" expected but "." found


What could it be? thanks