摘要:代码如下: procedure TForm1.Button1Click(Sender: TObject); Type PPMyInteger=^PInteger;//定义一个二级指针类型 var vPint:PInteger;//一级指针//等价于vPint:^Integer; vPPInt:^PI
阅读全文
摘要:先定义一个函数: private function weekday(WDays:Integer):string; 看实现部分的代码: function TForm1.weekday(WDays: Integer): string; type Tweek=(sunday,monday,tuesday,
阅读全文
摘要:先定义一个函数: private function recursion(x:Real):Real; 实现代码: implementation {$R *.dfm} function TForm1.recursion(x: Real): Real; begin if x=0 then begin //
阅读全文
摘要:先自定义枚举类型,然后用该枚举类型的个数定义一个字符串数组,再定义一个该枚举类型的变量,用于for循环时: procedure TForm1.Button3Click(Sender: TObject); type Tweeks=(mon,Tue,wed,thu,fri,sat,sun); var a
阅读全文