home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 November / Chip_2002-11_cd1.bin / zkuste / delphi / nastroje / DEBUGDEL.ZIP / testmain.pas < prev   
Pascal/Delphi Source File  |  2002-04-07  |  2KB  |  68 lines

  1. UNIT testmain;
  2.  
  3. INTERFACE
  4.  
  5. USES
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls;
  8.  
  9. TYPE
  10.   TForm1 = CLASS( TForm )
  11.     Button1 : TButton;
  12.     PROCEDURE FormCreate( Sender : TObject );
  13.     PROCEDURE DisplaySomething( Sender : TObject );
  14.     PROCEDURE FormDestroy( Sender : TObject );
  15.   PRIVATE
  16.     { Private declarations }
  17.     MyOutput : Text;
  18.   PUBLIC
  19.     { Public declarations }
  20.   END;
  21.  
  22. VAR
  23.   Form1 : TForm1;
  24.  
  25. IMPLEMENTATION
  26.  
  27. USES
  28.   DebugInterface;
  29.  
  30. {$R *.DFM}
  31.  
  32. PROCEDURE TForm1.FormCreate( Sender : TObject );
  33. BEGIN
  34.   // Extra File Variables are available in professional mode only
  35.   // OpenAuxDebugOutput(MyOutput , 1);  // Channel 0 .. 9 possible (0 = Main)
  36. END;
  37.  
  38. PROCEDURE TForm1.DisplaySomething( Sender : TObject );
  39. VAR
  40.   j         : Integer;
  41.   mess      : STRING;
  42.   lineno    : STRING;
  43. BEGIN
  44.   WriteLn('Main Channel used (-M-  =  MainChannel)');
  45.   WriteLn(DBChannel[1],'Minor Channel 1 used');
  46.   WriteLn(DBChannel[2],'Minor Channel 2 used');
  47.   // Next two lines can only be activated in professional mode !!!
  48.   // WriteLn(DBChannel[3],'Minor Channel 3 availlable in professional mode only');
  49.   // WriteLn(MyOutput, 'Auxilary Channel used, allocated is channel 1');
  50.   Mess := '012345678|';
  51.   Mess := Mess + Mess;
  52.   Mess := Mess + Mess;
  53.  
  54.   FOR j := 0 TO 9 DO BEGIN
  55.     Str( j + 1, lineno );
  56.     WriteLn( lineno + '-' + mess );
  57.   END;
  58. END;
  59.  
  60. PROCEDURE TForm1.FormDestroy( Sender : TObject );
  61. BEGIN
  62.   // Extra File Variables are available in professional mode only
  63.   // CloseAuxDebugOutput(MyOutput);
  64. END;
  65.  
  66. END.
  67.  
  68.