mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-10-31 02:42:33 +01:00 
			
		
		
		
	examples: fixed pascalstream with FPC 3.0+
git-svn-id: trunk@54891 -
This commit is contained in:
		
							parent
							
								
									510e6e4c49
								
							
						
					
					
						commit
						d3ff637f6e
					
				| @ -1,7 +1,7 @@ | ||||
| <?xml version="1.0"?> | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <CONFIG> | ||||
|   <ProjectOptions> | ||||
|     <Version Value="9"/> | ||||
|     <Version Value="10"/> | ||||
|     <General> | ||||
|       <Flags> | ||||
|         <MainUnitHasCreateFormStatements Value="False"/> | ||||
| @ -14,7 +14,6 @@ | ||||
|     <VersionInfo> | ||||
|       <Language Value=""/> | ||||
|       <CharSet Value=""/> | ||||
|       <StringTable ProductVersion=""/> | ||||
|     </VersionInfo> | ||||
|     <BuildModes Count="1"> | ||||
|       <Item1 Name="default" Default="True"/> | ||||
| @ -43,7 +42,6 @@ | ||||
|       <Unit0> | ||||
|         <Filename Value="PascalStream1.lpr"/> | ||||
|         <IsPartOfProject Value="True"/> | ||||
|         <UnitName Value="PascalStream1"/> | ||||
|       </Unit0> | ||||
|       <Unit1> | ||||
|         <Filename Value="componentstreampas.pas"/> | ||||
| @ -66,9 +64,6 @@ | ||||
|       <IncludeFiles Value="$(ProjOutDir)"/> | ||||
|       <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> | ||||
|     </SearchPaths> | ||||
|     <Other> | ||||
|       <CompilerPath Value="$(CompPath)"/> | ||||
|     </Other> | ||||
|   </CompilerOptions> | ||||
|   <Debugging> | ||||
|     <Exceptions Count="3"> | ||||
|  | ||||
| @ -92,6 +92,9 @@ type | ||||
|     procedure WriteBoolean(Value: Boolean); override; | ||||
|     // procedure WriteChar(Value: Char); | ||||
|     procedure WriteFloat(const Value: Extended); override; | ||||
|     {$IF FPC_FULLVERSION >= 30000} | ||||
|     procedure WriteSignature; override; | ||||
|     {$ENDIF} | ||||
|     procedure WriteSingle(const Value: Single); override; | ||||
|     procedure WriteCurrency(const Value: Currency); override; | ||||
|     procedure WriteDate(const Value: TDateTime); override; | ||||
| @ -236,6 +239,7 @@ var | ||||
|   i: Integer; | ||||
|   InString: Boolean; | ||||
| begin | ||||
|   Result:=''; | ||||
|   InString:=false; | ||||
|   for i:=1 to length(s) do begin | ||||
|     case s[i] of | ||||
| @ -363,6 +367,13 @@ begin | ||||
|   WritePropertyAssignment(FloatToStr(Value)); | ||||
| end; | ||||
| 
 | ||||
| {$IF FPC_FULLVERSION >= 30000} | ||||
| procedure TPASObjectWriter.WriteSignature; | ||||
| begin | ||||
| 
 | ||||
| end; | ||||
| {$ENDIF} | ||||
| 
 | ||||
| procedure TPASObjectWriter.WriteSingle(const Value: Single); | ||||
| begin | ||||
|   WritePropertyAssignment(FloatToStr(Value)); | ||||
| @ -430,7 +441,7 @@ end; | ||||
| procedure TPASObjectWriter.WriteUnicodeString(const Value: UnicodeString); | ||||
| // save unicodestrings as utf8 | ||||
| begin | ||||
|   WritePropertyAssignment(StringToConstant(Value)); | ||||
|   WritePropertyAssignment(StringToConstant(String(Value))); | ||||
| end; | ||||
| 
 | ||||
| procedure TPASObjectWriter.WriteVariant(const VarValue: Variant); | ||||
|  | ||||
| @ -99,7 +99,7 @@ type | ||||
| 
 | ||||
|     procedure WriteComponents; | ||||
|     procedure ReadComponents; | ||||
|     procedure OnFindComponentClass(Reader: TReader; const AClassName: string; | ||||
|     procedure OnFindComponentClass({%H-}Reader: TReader; const AClassName: string; | ||||
|                                    var ComponentClass: TComponentClass); | ||||
|     property Filename: string read FFilename write SetFilename; | ||||
|   end; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 mattias
						mattias