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

  • Home
  • SEARCH
  • 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 3660536
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:13:00+00:00 2026-05-19T01:13:00+00:00

Source: // write Path := ‘Data/_prefixed’ + dynarray1[v].Name; with XMLConfig1 do begin; SetValue(Path +

  • 0

Source:

  // write
  Path := 'Data/_prefixed' + dynarray1[v].Name;
  with XMLConfig1 do begin; 
      SetValue(Path  + '/RealName', dynarray1[v].Name);
  end;
  ..
  // read
  Path := 'Data/_prefixed' + listOfVars.Strings[v]; 
  with XMLConfig1 do begin;
     dynarray1[v].Name := GetValue(Path + '/RealName', '');
  end;

I think about writing simple macro like:

procedure getsetkey(Keyname,Var:string; var Value: **overloaded**; Direction: integer);
getset('Data/_prefixed'+Keyname, Var

but due to different return types it is still three (integer, string, boolean) similar functions (nothing like ?), or ever six function, if I throw out Direction argument and get a sets of setkey and getkey, or key(overload: call set if 4-th parameter presents), (Value is allowed to be empty, so checking the value isn’t the way to decide)

Any way to shorten number of functions and to associate dynarray1[v].Element_Name with a key that may be passed to GetValue()? Some kind of Reflection-like API to access key names?

  • 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-05-19T01:13:01+00:00Added an answer on May 19, 2026 at 1:13 am

    Variants would be more logical. If you can get reflection/RTTI info (e.g. everything you want to save is a published property) that is also possible.

    But IMHO for 3 variants of a 1 line function that is like shooting with a canon on a mosquito

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been given the following task: An external source will write a name, datetime
In an Open Source program I wrote , I'm reading binary data (written by
I wrote a batch script which recursively updates my source code against the company's
I have several small open-source projects that I wrote. All my attempts to find
Source RegexOptions.IgnoreCase is more expensive than I would have thought (eg, should be barely
Source: <TD> <A HREF=/home><IMG SRC=/images/home.gif></A> <IMG SRC=/images/spacer.gif> <A HREF=/search><IMG SRC=/images/search.gif></A> <IMG SRC=/images/spacer.gif> <A HREF=/help><IMG
My source code needs to support both .NET version 1.1 and 2.0 ... how
Can source code examples be kept in a SQL database while retaining all formatting
Open source implementation will be preferred.
Reading source code of sample projects, such as Beast and Bort, are recommended as

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.