Jump to content

Search the Community

Showing results for tags 'resolved'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 2 results

  1. Hi all, I am trying to get the maximum value, minimum value and average in the values in a string and separated by ; but it gives an error. I am waiting for help. Example code ; Error : --------------------------- '1.5' is not a valid floating point value. --------------------------- Memo text : 1,5;2,1;1,6; 1,1;1,3;1; 1,9;0,1;0,5; var Data: array of Double; MinValue, MaxValue, Sum: Double; Average: Double; var i : integer; s : string; strArray : TArray<string>; charArray : Array[0..0] of Char; begin s := Memo1.Text; charArray[0] := ';'; strArray := s.Split(charArray); i := 0; for i := 0 to Length(strArray) do begin Data[i] := StrToFloat(strArray[i]); end; var Count: Integer; i: Integer; begin MinValue := Data[0]; MaxValue := Data[0]; Sum := 0; Count := Length(Data); for i := 0 to Count - 1 do begin if Data[i] < MinValue then MinValue := Data[i]; if Data[i] > MaxValue then MaxValue := Data[i]; Sum := Sum + Data[i]; end; Average := Sum / Count; Edit1.Text := FloatToStr(MinValue); Edit2.Text := FloatToStr(MaxValue); Edit3.Text := FloatToStr(Average); Edit4.Text := FloatToStr(Sum);
  2. Hello. I am using RTTI to loop trough attributes. If I do this I get FALSE with the IS operator. I premise that "Attribute" is surely and absolutely "MyAttributeOne" class. if Attribute Is MyAttributeOne then IsMyAttributeOne := True But if I do this if Attribute.ClassNameIs('MyAttributeOne') then IsMyAttributeOne := True Then I get a wonderful TRUE. Any idea about this? Thanks Eddy
×