mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-05 03:30:33 +02:00
+ Added overloaded stringtoset which starts from typinfo, not propinfo
git-svn-id: trunk@492 -
This commit is contained in:
parent
2ec3e6db01
commit
64f1948f3e
@ -275,6 +275,7 @@ function SetToString(TypeInfo: PTypeInfo; Value: Integer; Brackets: Boolean) : S
|
||||
function SetToString(PropInfo: PPropInfo; Value: Integer; Brackets: Boolean) : String;
|
||||
function SetToString(PropInfo: PPropInfo; Value: Integer) : String;
|
||||
function StringToSet(PropInfo: PPropInfo; const Value: string): Integer;
|
||||
function StringToSet(TypeInfo: PTypeInfo; const Value: string): Integer;
|
||||
|
||||
const
|
||||
BooleanIdents: array[Boolean] of String = ('False', 'True');
|
||||
@ -412,8 +413,13 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Function StringToSet(PropInfo: PPropInfo; const Value: string): Integer;
|
||||
|
||||
begin
|
||||
Result:=StringToSet(PropInfo^.PropType,Value);
|
||||
end;
|
||||
|
||||
Function StringToSet(TypeInfo: PTypeInfo; const Value: string): Integer;
|
||||
Var
|
||||
S,T : String;
|
||||
I : Integer;
|
||||
@ -421,7 +427,7 @@ Var
|
||||
|
||||
begin
|
||||
Result:=0;
|
||||
PTI:=GetTypeData(PropInfo^.PropType)^.Comptype;
|
||||
PTI:=GetTypeData(TypeInfo)^.Comptype;
|
||||
S:=Value;
|
||||
I:=1;
|
||||
If Length(S)>0 then
|
||||
|
Loading…
Reference in New Issue
Block a user