Math387.FormatSample / FormatSamplef Method

Overload List

#SignatureDescription
1function FormatSample(Format: Char; const X: Double): string;
2function FormatSample(Format: Char; const X: Single): string;
3function FormatSample(X: Double; const Format: string): string;The double number X formated as string.
4function FormatSample(const Format: string; X: Double): string;The double number X formatted as string.
5function FormatSamplef(X: Single; const Format: string): string;
6function FormatSamplef(const Format: string; X: Single): string;

Overload 1: function FormatSample(Format: Char; const X: Double): string;

#NameTypeDescription
1FormatChar
2XDouble

Returns: String

Overload 2: function FormatSample(Format: Char; const X: Single): string;

#NameTypeDescription
1FormatChar
2XSingle

Returns: String

Overload 3: function FormatSample(X: Double; const Format: string): string;

The double number X formated as string.

#NameTypeDescription
1XDoublescalar
2Formatstring

Returns: String - the double number, formated as string.

Remarks:

The Format parameter defines the valid format string. This function is similar to Delphi FormatFloat function, but it also supports single precision type by displaying only 7 valid digits instead of Delphi FormatFloat 15 valid digits.

See Also: Math387.SampleToStr

Overload 4: function FormatSample(const Format: string; X: Double): string;

The double number X formatted as string.

#NameTypeDescription
1Formatstring
2XDoublescalar

Returns: String - the double number, formatted as string.

Overload 5: function FormatSamplef(X: Single; const Format: string): string;

#NameTypeDescription
1XSinglescalar
2Formatstring

Returns: String

Overload 6: function FormatSamplef(const Format: string; X: Single): string;

#NameTypeDescription
1Formatstring
2XSinglescalar

Returns: String