Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8260623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:08:27+00:00 2026-06-08T03:08:27+00:00

The title may be updated once the question is posted, But I start with

  • 0

The title may be updated once the question is posted, But I start with an .ini file I would like to save Integers , Strings , Bool To this .ini file. Which I can do with

WriteString
WriteInteger
WriteBool

Then I Would like to read it into a list, Where when i pulled the data from the list it would know its all ready a integer or string or bool?

Currently I have to write everything as a string and then i read into a stringlist.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T03:08:28+00:00Added an answer on June 8, 2026 at 3:08 am

    As said, you can read all data as string. And you can use the following function to determine the datatype:

    type
      TDataType = (dtString, dtBoolean, dtInteger);
    
    function GetDatatype(const AValue: string): TDataType;
    var
      temp : Integer;
    begin
      if TryStrToInt(AValue, temp) then
        Result := dtInteger   
      else if (Uppercase(AValue) = 'TRUE') or (Uppercase(AValue) = 'FALSE') then
        Result := dtBoolean
      else
        Result := dtString;
    end;
    
    
    You can (ab)use the object property of the stringlist to store the datatype:
    
    
    procedure TMyObject.AddInteger(const AValue: Integer);
    begin
      List.AddObject(IntToStr(AValue), TObject(dtInteger));
    end;
    
    procedure TMyObject.AddBoolean(const AValue: Boolean);
    begin
      List.AddObject(BoolToStr(AValue), TObject(dtBoolean));
    end;
    
    procedure TMyObject.AddString(const AValue: String);
    begin
      List.AddObject(AValue, TObject(dtString));
    
    end; 
    
    function TMyObject.GetDataType(const AIndex: Integer): TDataType;
    begin
      Result := TDataType(List.Objects[AIndex]);
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know the question title may be confusing, but here is what I am
Title may be confusing, but here's explanation with code. Based on some conditions, I
The title may be a bit ambiguous, but I couldn't think of a better
The title may be a little confusing, but I don't know how else to
The title may have been confusing, but please let me explain: Currently when I
The title may sound confusing but it actually isn't, I just didn't know how
I've updated the title and the text of my original question after gaining more
This may be a basic question but I am using HTML anchor, with the
my title may not be clear. But basically what I want to do is:
First of all, I'd like to ask to correct my question title if something

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.