Delphi6函数大全4-SysUtils.pas
首部 function FormatFloat(const Format: string; Value: Extended): string; $ of Char;
E: Extended;
begin
E := StrToFloatDef(Edit1.Text, 0);
SpinEdit1.Value := FloatToTextFmt(vBuffer, E,
fvExtended, PChar(Edit2.Text));
Edit3.Text := Copy(vBuffer, 1, SpinEdit1.Value);
end;
///////End FloatToTextFmt
━━━━━━━━━━━━━━━━━━━━━
首部 function StrToFloat(const S: string): Extended; $
参考 function SysUtils.DateTimeToTimeStamp
例子
///////Begin DecodeDateFully
procedure TForm1.Button1Click(Sender: TObject);
var
Year, Month, Day, DOW: Word;
begin
DecodeDateFully(Date, Year, Month, Day, DOW);
SpinEdit1.Value := Year;
SpinEdit2.Value := Month;
SpinEdit3.Value := Day;
SpinEdit4.Value := DOW;
end;
///////End DecodeDateFully
━━━━━━━━━━━━━━━━━━━━━
首部 function InternalDecodeDate(const DateTime: TDateTime; var Year, Month, Day, DOW: Word): Boolean; $ of string =
('星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六');
begin
Edit1.Text := cWeekCn;
end;
///////End DayOfWeek
━━━━━━━━━━━━━━━━━━━━━
