随笔分类 - Delphi学习记录
记录学习过程中的点点滴滴
摘要:program Project2;{$APPTYPE CONSOLE}usesWindows,SysUtils,TLHelp32; {$R *.RES} function GetWinDir: string; var Buf: array[0..MAX_PATH] of char; begin GetSystemDirectory(Buf, MAX_PATH); Result := Buf; if Result[Length(Result)] '\' then Result := Result + '\'; end; //取本机的计算机名 function...
阅读全文
摘要:program Project2;{$APPTYPE CONSOLE}uses SysUtils;//定义一个结构类型type Tpeople = record Name :string; Age:Integer; Sex:string;end;procedure init();begin Writeln('┏━━━━━┳━━━━━┳━━━━━┓'); Writeln('┣━━━━━┻━━━━━┻━━━━━┫'); Writeln('┃ Delphi控制台输入输出测试程序 ┃'); Writeln('┃ (a:)运行DEMO1 ┃'
阅读全文
摘要:program Project2;{$APPTYPE CONSOLE}uses SysUtils;//定义一个结构类型type Tpeople = record Name :string; Age:Integer; Sex:string;end;var people:Tpeople;begin with people do begin Name := '小明'; Age := 25; Sex := '男'; end; Writeln('Name:',people.Name); Writeln('Age:',people.Age);
阅读全文
摘要:首先新建一个控制台项目:练习下指针类型的数据赋值和使用program Project1;{$APPTYPE CONSOLE}uses SysUtils; type pint=^Integer;//定义指针类型 var a:Integer; b:Integer; c:Integer; pt:pint;//整形指针 p:Pointer;//无类型指针begin a:=2; b:=3; pt:=@b;//整形指针指向整形数据 Writeln('pt=', pt^); p:=@a;//无类型指针指向整形数据 //Writeln('p=', p^);...
阅读全文
摘要:打包下载:http://files.cnblogs.com/qqook/p1.rarunit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) lbl1: TLabel; lbl2: TLabel; lbl3: TLabel; lbl4: TLabel; edt1: TEdit; btn1: TButton; btn2:...
阅读全文
浙公网安备 33010602011771号