mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-26 15:51:43 +01:00
* implemented fpc_WideStr_Currency, fpc_chararray_Currency, fpc_Val_Currency_WideStr.
git-svn-id: trunk@5861 -
This commit is contained in:
parent
538e1bb8e8
commit
adae4e9976
@ -105,9 +105,11 @@ procedure fpc_WideStr_uint(v : valuint;Len : SizeInt; out S : WideString); compi
|
|||||||
{$endif CPU64}
|
{$endif CPU64}
|
||||||
{$ifdef FPC_HAS_FEATURE_WIDESTRINGS}
|
{$ifdef FPC_HAS_FEATURE_WIDESTRINGS}
|
||||||
procedure fpc_WideStr_Float(d : ValReal;len,fr,rt : SizeInt;out s : WideString); compilerproc;
|
procedure fpc_WideStr_Float(d : ValReal;len,fr,rt : SizeInt;out s : WideString); compilerproc;
|
||||||
|
procedure fpc_WideStr_Currency(c : Currency;len,fr : SizeInt;out s : WideString);compilerproc;
|
||||||
{$endif FPC_HAS_FEATURE_WIDESTRINGS}
|
{$endif FPC_HAS_FEATURE_WIDESTRINGS}
|
||||||
|
|
||||||
procedure fpc_chararray_Float(d : ValReal;len,fr,rt : SizeInt;out a : array of char); compilerproc;
|
procedure fpc_chararray_Float(d : ValReal;len,fr,rt : SizeInt;out a : array of char); compilerproc;
|
||||||
|
procedure fpc_chararray_Currency(c : Currency;len,fr : SizeInt;out a : array of char);compilerproc;
|
||||||
|
|
||||||
{ Val() support }
|
{ Val() support }
|
||||||
Function fpc_Val_Real_ShortStr(const s : shortstring; out code : ValSInt): ValReal; compilerproc;
|
Function fpc_Val_Real_ShortStr(const s : shortstring; out code : ValSInt): ValReal; compilerproc;
|
||||||
@ -124,6 +126,7 @@ Function fpc_Val_Currency_AnsiStr(Const S : AnsiString; out Code : ValSInt): Cur
|
|||||||
Function fpc_Val_Real_WideStr(Const S : WideString; out Code : ValSInt): ValReal; compilerproc;
|
Function fpc_Val_Real_WideStr(Const S : WideString; out Code : ValSInt): ValReal; compilerproc;
|
||||||
Function fpc_Val_UInt_WideStr (Const S : WideString; out Code : ValSInt): ValUInt; compilerproc;
|
Function fpc_Val_UInt_WideStr (Const S : WideString; out Code : ValSInt): ValUInt; compilerproc;
|
||||||
Function fpc_Val_SInt_WideStr (DestSize: SizeInt; Const S : WideString; out Code : ValSInt): ValSInt; compilerproc;
|
Function fpc_Val_SInt_WideStr (DestSize: SizeInt; Const S : WideString; out Code : ValSInt): ValSInt; compilerproc;
|
||||||
|
Function fpc_Val_Currency_WideStr(Const S : WideString; out Code : ValSInt): Currency; compilerproc;
|
||||||
{$endif FPC_HAS_FEATURE_WIDESTRINGS}
|
{$endif FPC_HAS_FEATURE_WIDESTRINGS}
|
||||||
{$ifndef CPU64}
|
{$ifndef CPU64}
|
||||||
Function fpc_val_int64_shortstr(Const S: ShortString; out Code: ValSInt): Int64; compilerproc;
|
Function fpc_val_int64_shortstr(Const S: ShortString; out Code: ValSInt): Int64; compilerproc;
|
||||||
|
|||||||
@ -627,6 +627,20 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure fpc_chararray_Currency(c : Currency;len,fr : SizeInt;out a : array of char);compilerproc;
|
||||||
|
var
|
||||||
|
ss : shortstring;
|
||||||
|
maxlen : SizeInt;
|
||||||
|
begin
|
||||||
|
str(c:len:fr,ss);
|
||||||
|
if length(ss)<high(a)+1 then
|
||||||
|
maxlen:=length(ss)
|
||||||
|
else
|
||||||
|
maxlen:=high(a)+1;
|
||||||
|
move(ss[1],pchar(@a)^,maxlen);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{*****************************************************************************
|
{*****************************************************************************
|
||||||
Val() Functions
|
Val() Functions
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
|||||||
@ -1138,6 +1138,23 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Function fpc_Val_Currency_WideStr(Const S : WideString; out Code : ValSInt): Currency; [public, alias:'FPC_VAL_CURRENCY_WIDESTR']; compilerproc;
|
||||||
|
Var
|
||||||
|
SS : String;
|
||||||
|
begin
|
||||||
|
if length(S) > 255 then
|
||||||
|
begin
|
||||||
|
fpc_Val_Currency_WideStr:=0;
|
||||||
|
code := 256;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
SS := S;
|
||||||
|
Val(SS,fpc_Val_Currency_WideStr,code);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
Function fpc_Val_UInt_WideStr (Const S : WideString; out Code : ValSInt): ValUInt; [public, alias:'FPC_VAL_UINT_WIDESTR']; compilerproc;
|
Function fpc_Val_UInt_WideStr (Const S : WideString; out Code : ValSInt): ValUInt; [public, alias:'FPC_VAL_UINT_WIDESTR']; compilerproc;
|
||||||
Var
|
Var
|
||||||
SS : ShortString;
|
SS : ShortString;
|
||||||
@ -1211,6 +1228,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure fpc_WideStr_Currency(c : Currency;len,fr : SizeInt;out s : WideString);compilerproc;
|
||||||
|
var
|
||||||
|
ss : shortstring;
|
||||||
|
begin
|
||||||
|
str(c:len:fr,ss);
|
||||||
|
s:=ss;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
Procedure fpc_WideStr_SInt(v : ValSint; Len : SizeInt; out S : WideString);compilerproc;
|
Procedure fpc_WideStr_SInt(v : ValSint; Len : SizeInt; out S : WideString);compilerproc;
|
||||||
Var
|
Var
|
||||||
SS : ShortString;
|
SS : ShortString;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user