title: I am getting an "undeclared identifier" error in Delphi and I don't know why?
body: <p>I am having troubles and am unsure as to why i am getting an "Undeclared Identifier" error in the following code:</p>
  
  <pre><code>procedure getword;
  var
    i: integer;
  begin
    randomize;
    randomwordnumber := random (20) + 1;
    randomword := wordlist [randomwordnumber];
    for i:=1 to length(randomword) do word:= word + '?';
    lblrandomword.Caption := (word);
  end;
  </code></pre>
  
  <p>Also here is the exact error code:</p>
  
  <pre><code>[Error] Unit1.pas(138): Undeclared identifier: 'lblrandomword'
  </code></pre>
  
  <p>Thank-You in advance!</p>