Changeset 245 for oup/current/Global/Functions.pas
- Timestamp:
- Aug 18, 2007, 5:51:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Global/Functions.pas
r113 r245 15 15 function MakeDatLink(FileID: Integer): Integer; 16 16 17 function ReadString(Stream: TStream; Offset: Integer): String; 18 17 19 function StringSmaller(string1, string2: String): Boolean; 18 20 … … 142 144 begin 143 145 Result := FileID * 256 + 1; 146 end; 147 148 149 150 151 function ReadString(Stream: TStream; Offset: Integer): String; 152 var 153 i: Integer; 154 c: Char; 155 begin 156 if Assigned(Stream) then 157 begin 158 if Offset >= 0 then 159 begin 160 Result := ''; 161 Stream.Seek(Offset, soFromBeginning); 162 repeat 163 Stream.Read(c, 1); 164 if Ord(c) > 0 then 165 Result := Result + c; 166 until Ord(c) = 0; 167 end; 168 end; 144 169 end; 145 170
Note:
See TracChangeset
for help on using the changeset viewer.