Recent

Author Topic: Keyboard doesn't respond when recompiling old TP code.  (Read 1500 times)

DavyGravy

  • Newbie
  • Posts: 6
Keyboard doesn't respond when recompiling old TP code.
« on: December 23, 2014, 12:06:07 am »
This one is similar to the one posted Dec 19, but slightly different. Originally, the screen did not recognize input from the keyboard when the AssignCRT statement referenced "Input" as in the old TurboPascal program. It was corrected when the AssignCRT statement referenced file F. - - That one is fixed. - - Now for the new (similar) problem.

Later in the program, I enter graphics mode with the following code.
BEGIN
  GraphDriver := Detect;
  InitGraph(GraphDriver, GraphMode, 'C:\EVOLUTE');
  SetFillStyle(1, Black);
  Bar(0,0,640,480);                         (* Blank the whole screen *)
  SetColor(Red);
  MoveTo(320, 240);
  SetTextStyle  (GothicFont, HorizDir, 2);
  SetTextJustify(1, 1);
  OutText('Building First Generation...');      (* Output the message *)
  Delay(2000); 
....... more code


Then later in that subroutine when it's time for operator input....
  MoveTo(320, 470);
  SetColor(Cyan);
  SetTextStyle  (0, 0, 1);
  SetTextJustify(1, 1);
  OutText('Press enter to view the chart:');
  Readln;   (program locks up here !!! )

Bingo! A similar problem as before. The program now fails to recognize the operator's input again! Any ideas? Probably something obvious to you FPC experts. Thanks!!!!           

 

TinyPortal © 2005-2018