mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 18:09:12 +02:00
* changed the output parameters of a bunch of *tofloat() and
trystrtocurr() from var to out (mantis #13289) git-svn-id: trunk@12862 -
This commit is contained in:
parent
1ce7a88d65
commit
f13006c7f2
@ -1038,7 +1038,7 @@ begin
|
|||||||
Result:=Default;
|
Result:=Default;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TextToFloat(Buffer: PChar; Var Value: Extended; Const FormatSettings: TFormatSettings): Boolean;
|
Function TextToFloat(Buffer: PChar; Out Value: Extended; Const FormatSettings: TFormatSettings): Boolean;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
E,P : Integer;
|
E,P : Integer;
|
||||||
@ -1063,19 +1063,19 @@ Begin
|
|||||||
Result:=(E=0);
|
Result:=(E=0);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TextToFloat(Buffer: PChar; Var Value: Extended): Boolean;
|
Function TextToFloat(Buffer: PChar; Out Value: Extended): Boolean;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=TextToFloat(Buffer,Value,DefaultFormatSettings);
|
Result:=TextToFloat(Buffer,Value,DefaultFormatSettings);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TextToFloat(Buffer: PChar; Var Value; ValueType: TFloatValue): Boolean;
|
Function TextToFloat(Buffer: PChar; Out Value; ValueType: TFloatValue): Boolean;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=TextToFloat(Buffer,Value,ValueType,DefaultFormatSettings);
|
Result:=TextToFloat(Buffer,Value,ValueType,DefaultFormatSettings);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TextToFloat(Buffer: PChar; Var Value; ValueType: TFloatValue; Const FormatSettings: TFormatSettings): Boolean;
|
Function TextToFloat(Buffer: PChar; Out Value; ValueType: TFloatValue; Const FormatSettings: TFormatSettings): Boolean;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
E,P : Integer;
|
E,P : Integer;
|
||||||
@ -1120,36 +1120,36 @@ Begin
|
|||||||
Result:=(E=0);
|
Result:=(E=0);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TryStrToFloat(Const S : String; Var Value: Single): Boolean;
|
Function TryStrToFloat(Const S : String; Out Value: Single): Boolean;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=TryStrToFloat(S,Value,DefaultFormatSettings);
|
Result:=TryStrToFloat(S,Value,DefaultFormatSettings);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TryStrToFloat(Const S : String; Var Value: Single; Const FormatSettings: TFormatSettings): Boolean;
|
Function TryStrToFloat(Const S : String; Out Value: Single; Const FormatSettings: TFormatSettings): Boolean;
|
||||||
Begin
|
Begin
|
||||||
Result := TextToFloat(PChar(pointer(S)), Value, fvSingle,FormatSettings);
|
Result := TextToFloat(PChar(pointer(S)), Value, fvSingle,FormatSettings);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TryStrToFloat(Const S : String; Var Value: Double): Boolean;
|
Function TryStrToFloat(Const S : String; Out Value: Double): Boolean;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=TryStrToFloat(S,Value,DefaultFormatSettings);
|
Result:=TryStrToFloat(S,Value,DefaultFormatSettings);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TryStrToFloat(Const S : String; Var Value: Double; Const FormatSettings: TFormatSettings): Boolean;
|
Function TryStrToFloat(Const S : String; Out Value: Double; Const FormatSettings: TFormatSettings): Boolean;
|
||||||
Begin
|
Begin
|
||||||
Result := TextToFloat(PChar(pointer(S)), Value, fvDouble,FormatSettings);
|
Result := TextToFloat(PChar(pointer(S)), Value, fvDouble,FormatSettings);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
{$ifdef FPC_HAS_TYPE_EXTENDED}
|
{$ifdef FPC_HAS_TYPE_EXTENDED}
|
||||||
Function TryStrToFloat(Const S : String; Var Value: Extended): Boolean;
|
Function TryStrToFloat(Const S : String; Out Value: Extended): Boolean;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=TryStrToFloat(S,Value,DefaultFormatSettings);
|
Result:=TryStrToFloat(S,Value,DefaultFormatSettings);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TryStrToFloat(Const S : String; Var Value: Extended; Const FormatSettings: TFormatSettings): Boolean;
|
Function TryStrToFloat(Const S : String; Out Value: Extended; Const FormatSettings: TFormatSettings): Boolean;
|
||||||
Begin
|
Begin
|
||||||
Result := TextToFloat(PChar(pointer(S)), Value,FormatSettings);
|
Result := TextToFloat(PChar(pointer(S)), Value,FormatSettings);
|
||||||
End;
|
End;
|
||||||
@ -1680,7 +1680,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
Function TryStrToCurr(Const S : String; Var Value: Currency): Boolean;
|
Function TryStrToCurr(Const S : String; Out Value: Currency): Boolean;
|
||||||
Begin
|
Begin
|
||||||
Result := TextToFloat(PChar(pointer(S)), Value, fvCurrency);
|
Result := TextToFloat(PChar(pointer(S)), Value, fvCurrency);
|
||||||
End;
|
End;
|
||||||
|
@ -175,18 +175,18 @@ Function StrToFloat(Const S : String) : Extended;
|
|||||||
Function StrToFloat(Const S : String; Const FormatSettings: TFormatSettings) : Extended;
|
Function StrToFloat(Const S : String; Const FormatSettings: TFormatSettings) : Extended;
|
||||||
Function StrToFloatDef(Const S: String; Const Default: Extended): Extended;
|
Function StrToFloatDef(Const S: String; Const Default: Extended): Extended;
|
||||||
Function StrToFloatDef(Const S: String; Const Default: Extended; Const FormatSettings: TFormatSettings): Extended;
|
Function StrToFloatDef(Const S: String; Const Default: Extended; Const FormatSettings: TFormatSettings): Extended;
|
||||||
Function TryStrToFloat(Const S : String; Var Value: Single): Boolean;
|
Function TryStrToFloat(Const S : String; Out Value: Single): Boolean;
|
||||||
Function TryStrToFloat(Const S : String; Var Value: Single; Const FormatSettings: TFormatSettings): Boolean;
|
Function TryStrToFloat(Const S : String; Out Value: Single; Const FormatSettings: TFormatSettings): Boolean;
|
||||||
Function TryStrToFloat(Const S : String; Var Value: Double): Boolean;
|
Function TryStrToFloat(Const S : String; Out Value: Double): Boolean;
|
||||||
Function TryStrToFloat(Const S : String; Var Value: Double; Const FormatSettings: TFormatSettings): Boolean;
|
Function TryStrToFloat(Const S : String; Out Value: Double; Const FormatSettings: TFormatSettings): Boolean;
|
||||||
{$ifdef FPC_HAS_TYPE_EXTENDED}
|
{$ifdef FPC_HAS_TYPE_EXTENDED}
|
||||||
Function TryStrToFloat(Const S : String; Var Value: Extended): Boolean;
|
Function TryStrToFloat(Const S : String; Out Value: Extended): Boolean;
|
||||||
Function TryStrToFloat(Const S : String; Var Value: Extended; Const FormatSettings: TFormatSettings): Boolean;
|
Function TryStrToFloat(Const S : String; Out Value: Extended; Const FormatSettings: TFormatSettings): Boolean;
|
||||||
{$endif FPC_HAS_TYPE_EXTENDED}
|
{$endif FPC_HAS_TYPE_EXTENDED}
|
||||||
Function TextToFloat(Buffer: PChar; Var Value: Extended): Boolean;
|
Function TextToFloat(Buffer: PChar; Out Value: Extended): Boolean;
|
||||||
Function TextToFloat(Buffer: PChar; Var Value: Extended; Const FormatSettings: TFormatSettings): Boolean;
|
Function TextToFloat(Buffer: PChar; Out Value: Extended; Const FormatSettings: TFormatSettings): Boolean;
|
||||||
Function TextToFloat(Buffer: PChar; Var Value; ValueType: TFloatValue): Boolean;
|
Function TextToFloat(Buffer: PChar; Out Value; ValueType: TFloatValue): Boolean;
|
||||||
Function TextToFloat(Buffer: PChar; Var Value; ValueType: TFloatValue; Const FormatSettings: TFormatSettings): Boolean;
|
Function TextToFloat(Buffer: PChar; Out Value; ValueType: TFloatValue; Const FormatSettings: TFormatSettings): Boolean;
|
||||||
Function FloatToText(Buffer: PChar; Value: Extended; format: TFloatFormat; Precision, Digits: Integer): Longint;
|
Function FloatToText(Buffer: PChar; Value: Extended; format: TFloatFormat; Precision, Digits: Integer): Longint;
|
||||||
Function FloatToText(Buffer: PChar; Value: Extended; format: TFloatFormat; Precision, Digits: Integer; Const FormatSettings: TFormatSettings): Longint;
|
Function FloatToText(Buffer: PChar; Value: Extended; format: TFloatFormat; Precision, Digits: Integer; Const FormatSettings: TFormatSettings): Longint;
|
||||||
Function FloatToDateTime (Const Value : Extended) : TDateTime;
|
Function FloatToDateTime (Const Value : Extended) : TDateTime;
|
||||||
@ -195,7 +195,7 @@ function TryFloatToCurr(const Value: Extended; var AResult: Currency): Boolean;
|
|||||||
|
|
||||||
Function CurrToStr(Value: Currency): string;
|
Function CurrToStr(Value: Currency): string;
|
||||||
function StrToCurr(const S: string): Currency;
|
function StrToCurr(const S: string): Currency;
|
||||||
function TryStrToCurr(const S: string;Var Value : Currency): Boolean;
|
function TryStrToCurr(const S: string;Out Value : Currency): Boolean;
|
||||||
function StrToCurrDef(const S: string; Default : Currency): Currency;
|
function StrToCurrDef(const S: string; Default : Currency): Currency;
|
||||||
|
|
||||||
Function FloatToTextFmt(Buffer: PChar; Value: Extended; format: PChar; FormatSettings : TFormatSettings): Integer;
|
Function FloatToTextFmt(Buffer: PChar; Value: Extended; format: PChar; FormatSettings : TFormatSettings): Integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user