Delphi P.1/16 Delphi Delphi Object Pascal Delphi Delphi Delphi (Borland) Windows Turbo Pascal Pascal Delphi Turbo Pascal Windows Pascal FORTRAN BASIC Java Algol Algol Pascal Pascal Pascal Pascal Delphi Turbo Pascal Pascal Windows Object Pascal Object Delphi Windows Delphi Delphi Delphi 8 Delphi for the Microsoft.NET Framework Delphi 8.NET Delphi Delphi 8 Delphi 7 Delphi 8 http://www.borland.co.jp/ Delphi 7 Delphi 7 Delphi 8 Pascal Delphi Pascal Pascal Pascal program ; x
Delphi P.2/16 var x begin end. Pascal program chap8_1; var x : integer; begin x := 10; writeln('x=', x); x := x * 2; writeln('x*2=',x:2); readln; end. Pascal Pascal Pascal Pascal Delphi Delphi Pascal dpr Delphi Delphi Windows Delphi Windows Delphi Pascal
Delphi P.3/16 Pascal Turbo Pascal Pascal.pas Delphi Delphi Delphi Delphi 8 VCL Delphi 7 Windows memo edit Delphi
Delphi P.4/16 PaintBox Delphi 7 chap8_1 Delphi memo Standard Tmemo memo memo1 memo1 memo1 memo1 lines memo1 Tbutton button Delphi 8
Delphi P.5/16 buttun1 button2 Caption button1 Start button2 End Start End Start Start procedure TForm1.Button1Click(Sender: TObject); Delphi x s begin s form1.memo1.lines.add(s) Button1Click Start End End begin close; chap8_1 Delphi (chap8_2) Start memo End Delphi Windows Delphi memo TMediaPlayer Delphi chap09_2
Delphi P.6/16 Delphi Delphi Delphi Windows Delphi IDE Rad(Rapid Application Development) chap8_2 2-Way Tool Delphi Delphi Delphi 8.dpr (.pas) Delphi 8.bdsproj chap8_2 (chap8_2.dpr) Pascal begin end. uses chap8_2a.pas program chap8_2; {% DelphiDotNetAssemblyCompiler 'c: borland common files borland shared bds sha
Delphi P.7/16 red assemblies 2.0 Borland.Vcl.dll'} uses System.Reflection, System.Runtime.CompilerServices, SysUtils, Forms, chap8_2a in 'chap8_2a.pas' {Form1}; {$ R *.res} [STAThread] begin Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; end. Pascal.pas Delphi Pascal.pas (chap8_2a.pas) unit chap8_2a; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Borland.Vcl.StdCtrls, System.ComponentModel; type
Delphi P.8/16 TForm1 = class(tform) Memo1: TMemo; Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private } public { Public } var Form1: TForm1; implementation {$ R *.nfm} procedure TForm1.Button1Click(Sender: TObject); var x : integer; s : string[10] ; begin x:= 10; s := 'x =' + IntToStr(x); form1.memo1.lines.add( s); x := x * 2; s := 'x*2 =' + IntToStr(x); form1.memo1.lines.add(s) procedure TForm1.Button2Click(Sender: TObject); begin close end. unit unit ;
Delphi P.9/16 (.pas) interface implementation uses Delphi type TForm1 = class(tform) Memo1 Button1 Button2 procedure private public var Form1 a = 10 const a = 10; implementation end. {$R *.nfm} TForm1 TForm1. TForm1. TForm1. Delphi Object Pascal Delphi
Delphi P.10/16 Delphi Caption Color Delphi Button1 Button2 TButton Caption Button1 Caption Start Button2 Caption End type Form1 (TForm1) TForm1 TForm TForm1 Memo Button TForm1 TForm1 Form1 TForm1 Form1 Delphi form1.memo1.lines.add memo Form1 Memo1 lines add lines TString TString add add add Canvas Canvas Delphi chap8_2 (OnClick) Pascal Pascal begin end. Delphi FormCreate FormCreate Delphi FormCreate (OnCreate) 3 Form1 Button1Click Button2Click Start Button1Click End Button2Click
Delphi P.11/16 Sender Sender TObject Delphi PowerPoint (char.ppt) char.ppt Enter Enter + Esc char.ppt Enter (Timer) Delphi Delphi Delphi chap8_3 chap8_3 1024 768 chap8_3a.pas TTimer Timer1 OnKeyDown Timer1Timer FormCreate unit chap8_3a; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Delphi P.12/16 Dialogs, ExtCtrls; type TForm1 = class(tform) Timer1: TTimer; procedure OnKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure Timer1Timer(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private } public { Public } const pre_order = '121323123';// var Form1 : TForm1; istep : byte;// istm : byte;// n_present : byte;// implementation {$ R *.dfm} procedure TForm1.OnKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);// begin if Key = VK_ESCAPE then close;{esc } if (Key = VK_RETURN) and (istep = 0) then{enter } begin timer1.enabled := true; Form1.Canvas.Rectangle(L eft, Top, Width, Height); procedure TForm1.Timer1Timer(Sender: TObject);// const
Delphi P.13/16 var s_focus : string[6] = ' ';// s_blank : string[6] = ' ';// s_stimuli : array[1..3] of string[6] = (' ',' ',' '); s_ending : array[1..2] of string[26] = (' ',' '); p_ord : byte;// s_id : byte;// begin timer1.enabled := false; istep := istep + 1;// if istep mod 3 = 1 then istm := istm + 1;// p_ord :=(istep-1) mod 3; if istm <= n_present then begin s_id := StrToInt(copy(pre_order,iStm,1)); with Canvas do begin Rectangle(0, 0, Width, Height); case p_ord of 0: TextOut(350, 300, s_blank); 1: TextOut(350, 300, s_focus); 2: TextOut(350, 300, s_stimuli[s_id]); { of case } {of with Canvas } { of if istm <= } if istm > n_present then with Canvas do begin if p_ord = 1 then begin Rectangle(0, 0, Width, Height); Font.Size := 28; TextOut(300, 350, s_ending[1]); TextOut(300, 450, s_ending[2]); end else TextOut(350, 300, s_blank); {of with Canvas } if (istm <= n_present) or ( p_ord = 0) then timer1.enabled := true; procedure TForm1.FormCreate(Sender: TObject);//
Delphi P.14/16 begin Left := -5; Top := -5;// Width := 1036; Height := 778;// with Canvas do begin//canvas Brush.Color := clblack;// Rectangle(Left, Top, Width, Height); // Pen.Color := clwhite;// Font.Size := 36; Font.Style := [fsbold];// TextOut(100, 350, 'Enter ');// Font.Size := 96;// istep := 0; istm := 0;// n_present := Length(pre_order);// pre_order with timer1 do begin { } enabled := false;// interval := 1200;// { of with timer1 }// end. FormCreate Left Top Width Length Left Form1.Left Form1 Form1. with Canvas do begin Canvas Canvas Brush.Color Canvas.Brush.Color with Canvas do Canvas. 1.2 FormCreate Enter OnKeyDown Enter istep OnKeyDown Enter OnKeyDownPress
Delphi P.15/16 1.2 Timer1Timer istep istm istep 0 2 p_ord istm pre_order if i_ord case if Enter istep Esc close chap8_3 Form1 BorderStyle bsnone Caption Windows FormStyle fsstayontop Font OnCreate FormCreate begin TForm1 OnKeyDown OnKeyDown OnKeyDown Timer OnTimer Timer1Timer chap8_3 FormCreate OnPaint FormCreate chap8_3 Delphi chap8_3 Delphi
Delphi P.16/16 chap8_4 (illusory correlation) chap8_5 chap8_4 Delphi Delphi Pascal Delphi Pascal Pascal Delphi Delphi