procedure RunSysExe(const exeprocessname: String;exeTitle:String);var //引用单元shellapi OFile:String; HWndCalculator:HWnd;begin HWndCalculator:=FindWindow(nil,pwidechar(exeTitle)); if (HWndCalculator=0) then begin OFile:=exeprocessname; Shellexe
Delphi 2009 中 Exit 的新用法Nick 描述了 Exit 在 Tiburon 中的新语法,看代码:function foo(const I: Integer): string;begin if I < 0 then Exit('负数'); Result := '正数'; end; function foo(const I: Integer): string;begin if I < 0 then begin Result :
在Pascal中,注释括在大括号中或带星号的圆括号中。Delphi 也认可C++ 风格的注释,即把注释放在双斜线后。例如{this is a comment}(* this is another comment *)// this is a comment up to the end of the line第一种注释方式较简略,使用也较为普遍;第二种方式在欧洲使用较广 ,因为欧洲的键盘缺少大括号;第三种方式的注释是从C++借用来的,只在32位版本的Delphi中可用,它在给一行代码加短注释时非常有用。上