mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 23:40:14 +02:00
* real functions ifdef'ed depending on the supported types
This commit is contained in:
parent
d43895d744
commit
7cb8b55abb
@ -218,35 +218,41 @@ end;
|
|||||||
|
|
||||||
{ Floats }
|
{ Floats }
|
||||||
|
|
||||||
|
{$ifdef SUPPORT_SINGLE}
|
||||||
operator :=(const source : single) dest : variant;
|
operator :=(const source : single) dest : variant;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Variant_Init(Dest);
|
Variant_Init(Dest);
|
||||||
VariantManager.VarFromReal(Dest,Source);
|
VariantManager.VarFromReal(Dest,Source);
|
||||||
end;
|
end;
|
||||||
|
{$endif SUPPORT_SINGLE}
|
||||||
|
|
||||||
|
|
||||||
|
{$ifdef SUPPORT_DOUBLE}
|
||||||
operator :=(const source : double) dest : variant;
|
operator :=(const source : double) dest : variant;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Variant_Init(Dest);
|
Variant_Init(Dest);
|
||||||
VariantManager.VarFromReal(Dest,Source);
|
VariantManager.VarFromReal(Dest,Source);
|
||||||
end;
|
end;
|
||||||
|
{$endif SUPPORT_DOUBLE}
|
||||||
|
|
||||||
|
|
||||||
|
{$ifdef SUPPORT_EXTENDED}
|
||||||
operator :=(const source : extended) dest : variant;
|
operator :=(const source : extended) dest : variant;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Variant_Init(Dest);
|
Variant_Init(Dest);
|
||||||
VariantManager.VarFromReal(Dest,Source);
|
VariantManager.VarFromReal(Dest,Source);
|
||||||
end;
|
end;
|
||||||
|
{$endif SUPPORT_EXTENDED}
|
||||||
|
|
||||||
|
|
||||||
|
{$ifdef SUPPORT_COMP}
|
||||||
Operator :=(const source : comp) dest : variant;
|
Operator :=(const source : comp) dest : variant;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Variant_Init(Dest);
|
Variant_Init(Dest);
|
||||||
VariantManager.VarFromReal(Dest,Source);
|
VariantManager.VarFromReal(Dest,Source);
|
||||||
end;
|
end;
|
||||||
|
{$endif SUPPORT_COMP}
|
||||||
|
|
||||||
|
|
||||||
{ Misc. }
|
{ Misc. }
|
||||||
{ Fixme!!!
|
{ Fixme!!!
|
||||||
@ -391,32 +397,36 @@ end;
|
|||||||
|
|
||||||
{ Floats }
|
{ Floats }
|
||||||
|
|
||||||
|
{$ifdef SUPPORT_SINGLE}
|
||||||
operator :=(const source : variant) dest : single;
|
operator :=(const source : variant) dest : single;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
dest:=variantmanager.vartoreal(source);
|
dest:=variantmanager.vartoreal(source);
|
||||||
end;
|
end;
|
||||||
|
{$endif SUPPORT_SINGLE}
|
||||||
|
|
||||||
|
|
||||||
|
{$ifdef SUPPORT_DOUBLE}
|
||||||
operator :=(const source : variant) dest : double;
|
operator :=(const source : variant) dest : double;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
dest:=variantmanager.vartoreal(source);
|
dest:=variantmanager.vartoreal(source);
|
||||||
end;
|
end;
|
||||||
|
{$endif SUPPORT_DOUBLE}
|
||||||
|
|
||||||
|
|
||||||
|
{$ifdef SUPPORT_EXTENDED}
|
||||||
operator :=(const source : variant) dest : extended;
|
operator :=(const source : variant) dest : extended;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
dest:=variantmanager.vartoreal(source);
|
dest:=variantmanager.vartoreal(source);
|
||||||
end;
|
end;
|
||||||
|
{$endif SUPPORT_EXTENDED}
|
||||||
|
|
||||||
|
|
||||||
|
{$ifdef SUPPORT_COMP}
|
||||||
operator :=(const source : variant) dest : comp;
|
operator :=(const source : variant) dest : comp;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
dest:=comp(variantmanager.vartoreal(source));
|
dest:=comp(variantmanager.vartoreal(source));
|
||||||
end;
|
end;
|
||||||
|
{$endif SUPPORT_COMP}
|
||||||
|
|
||||||
{ Misc. }
|
{ Misc. }
|
||||||
operator :=(const source : variant) dest : currency;
|
operator :=(const source : variant) dest : currency;
|
||||||
@ -587,7 +597,10 @@ procedure initvariantmanager;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.15 2003-11-05 15:26:37 florian
|
Revision 1.16 2003-12-10 01:36:39 florian
|
||||||
|
* real functions ifdef'ed depending on the supported types
|
||||||
|
|
||||||
|
Revision 1.15 2003/11/05 15:26:37 florian
|
||||||
+ currency type can be assigned to variants now
|
+ currency type can be assigned to variants now
|
||||||
|
|
||||||
Revision 1.14 2003/10/04 23:40:42 florian
|
Revision 1.14 2003/10/04 23:40:42 florian
|
||||||
|
@ -220,10 +220,18 @@ operator :=(const source : ansistring) dest : variant;
|
|||||||
operator :=(const source : widestring) dest : variant;
|
operator :=(const source : widestring) dest : variant;
|
||||||
|
|
||||||
{ Floats }
|
{ Floats }
|
||||||
|
{$ifdef SUPPORT_SINGLE}
|
||||||
operator :=(const source : single) dest : variant;
|
operator :=(const source : single) dest : variant;
|
||||||
|
{$endif SUPPORT_SINGLE}
|
||||||
|
{$ifdef SUPPORT_DOUBLE}
|
||||||
operator :=(const source : double) dest : variant;
|
operator :=(const source : double) dest : variant;
|
||||||
|
{$endif SUPPORT_DOUBLE}
|
||||||
|
{$ifdef SUPPORT_EXTENDED}
|
||||||
operator :=(const source : extended) dest : variant;
|
operator :=(const source : extended) dest : variant;
|
||||||
|
{$endif SUPPORT_EXTENDED}
|
||||||
|
{$ifdef SUPPORT_COMP}
|
||||||
operator :=(const source : comp) dest : variant;
|
operator :=(const source : comp) dest : variant;
|
||||||
|
{$endif SUPPORT_COMP}
|
||||||
|
|
||||||
{ Misc. }
|
{ Misc. }
|
||||||
{ Fixme!!!!
|
{ Fixme!!!!
|
||||||
@ -259,10 +267,18 @@ operator :=(const source : variant) dest : ansistring;
|
|||||||
operator :=(const source : variant) dest : widestring;
|
operator :=(const source : variant) dest : widestring;
|
||||||
|
|
||||||
{ Floats }
|
{ Floats }
|
||||||
|
{$ifdef SUPPORT_SINGLE}
|
||||||
operator :=(const source : variant) dest : single;
|
operator :=(const source : variant) dest : single;
|
||||||
|
{$endif SUPPORT_SINGLE}
|
||||||
|
{$ifdef SUPPORT_DOUBLE}
|
||||||
operator :=(const source : variant) dest : double;
|
operator :=(const source : variant) dest : double;
|
||||||
|
{$endif SUPPORT_DOUBLE}
|
||||||
|
{$ifdef SUPPORT_EXTENDED}
|
||||||
operator :=(const source : variant) dest : extended;
|
operator :=(const source : variant) dest : extended;
|
||||||
|
{$endif SUPPORT_EXTENDED}
|
||||||
|
{$ifdef SUPPORT_EXTENDED}
|
||||||
operator :=(const source : variant) dest : comp;
|
operator :=(const source : variant) dest : comp;
|
||||||
|
{$endif SUPPORT_COMP}
|
||||||
|
|
||||||
{ Misc. }
|
{ Misc. }
|
||||||
operator :=(const source : variant) dest : currency;
|
operator :=(const source : variant) dest : currency;
|
||||||
@ -295,7 +311,10 @@ operator <=(const op1,op2 : variant) dest : boolean;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.14 2003-11-05 15:26:37 florian
|
Revision 1.15 2003-12-10 01:36:39 florian
|
||||||
|
* real functions ifdef'ed depending on the supported types
|
||||||
|
|
||||||
|
Revision 1.14 2003/11/05 15:26:37 florian
|
||||||
+ currency type can be assigned to variants now
|
+ currency type can be assigned to variants now
|
||||||
|
|
||||||
Revision 1.13 2003/10/08 16:24:47 florian
|
Revision 1.13 2003/10/08 16:24:47 florian
|
||||||
|
Loading…
Reference in New Issue
Block a user