en en en en en en en en en en en en en en en en en en en en en en en en en en en es en en en en en en en en en en en en en en en en en en en en en en en nl en es en en en it en fr en uk en ceb en en en ro en en en en en en fr el fr de nb en de fr en de fr nb en en en en el en de nl en en en en nl en en en en en en fr en en en en en en en nl en en en en id en en fr en da en en en en en en en nl en en en en en ja en en en en en en en nl en en en en en id en en en en fr en da en en en en en en en nl en en en en en en en en nl en en en en nl vi en en en en en en en fr en en en en en en en nl en en en en en fr en da en en en en en en en nl fr en en en en en en en en en en en en en en de en en en fr en en en en en en en en en pt en en en en en en
By logging into your account, you agree to our Privacy Policy, personal data processing and storage practices as described therein.
Forgot password or user name?
Search in titles only Search in PowerBASIC for Windows only
You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
All Time Today Last Week Last Month
All Discussions only Photos only Videos only Links only Polls only Events only
I have been given a program written in a macro language that uses an .INI file as below:
What would be the best way to transfer this data to use in PBWIN, is it to still use an .ini file?. I need to loop through all the files above that were generated on the day that the program is run but I'm not sure how to use the headings in the ini file.
Join Date: Jan 2001
23 Feb 2009, 04:50 AM
Ini files can be read in PB without any problem. Especially if you use Eros Olmis ini file functions:
Join Date: Aug 1998
23 Feb 2009, 08:48 AM
And, you might also want to consider WHERE to store that INI file, if you want to avoid UAC problems writing to a protected folder:
Let Me Tell Ya Where to Stick It by Karl Peterson
Move That INI File!and Get That Ini File Name!
Port Washington WI USA
Join Date: Aug 1999
24 Feb 2009, 08:40 AM
Also have a look at the Windows API functions GetPrivateProfileString and WritePrivateProfileString. These are very handy for easily reading and writing INI files for any given key value at any time.
Summit Computer Networks, Inc.
Join Date: Aug 1998
24 Feb 2009, 08:55 AM
What would be the best way to transfer this data to use in PBWIN, is it to still use an .ini file?.
As far as, "Is an INI file the best way to store program-specific data which may change from run to run?" the answer is....
Probably. Or maybe not. Microsoft recommended INI files. Then they recommended the registry. Then they recommmended INI files. This cycle may have repeated several times.
I use INI files. Your mileage may vary.
(Good 'poll' question? Given your druthers, what do you currently use, INI files, Registry or "other"?)
Port Washington WI USA
Join Date: Apr 2000
24 Feb 2009, 09:14 AM
Originally posted by Michael Mattias View Post
(Good 'poll' question? Given your druthers, what do you currently use, INI files, Registry or "other"?)
INIs since day one, as I found it to be a good idea that one is able to view a config file with any text viewer/editor.
P.S. Meanwhile MS itself uses XML files (app.config/web.config), which is pretty much the same: an editable text file, just a different layout.
Join Date: Jan 2001
24 Feb 2009, 09:45 AM
Originally posted by Michael Mattias View Post
( what do you currently use, INI files, Registry or "other"?)
INI files (for the same reason as Knuth) and sometimes files using my own format, mainly if I have to store long binary data.
But never, ever the registry. I like to keep settings (INI) files as close as possible to the application program. Too bad Vista changed all that ..
Last edited by Eddy Van Esch; 24 Feb 2009, 09:48 AM.
Join Date: Aug 1998
24 Feb 2009, 10:37 AM
Whoa, there, I do not want to be guilty of starting one of those 22-page monstrosity threads... I meant, if someone were interested, start a new thread in suitable forum using the BBS' "poll" feature.....carfully wording the question, including options I had not thought of (eg "Microsoft XML storage format").
Port Washington WI USA
Join Date: Aug 2006
24 Feb 2009, 06:12 PM
Whoa, there, I do not want to be guilty of starting one of those 22-page monstrosity threads.
carfully wording the question, including options I had not thought of (eg "Microsoft XML storage format").
"Carefully" may not be my strong suit, but does bring back questions I have had for years (from time to time) and never found the time to research long.
Maybe now is as good a time as ever to spurn one of those long debates and see how others go about it???? (Personally I tried both Registry and INI and stuck with INI for maintenance purposes)
Engineer's Motto: If it aint broke take it apart and fix it
"If at 1st you don't succeed... call it version 1.0"
"Half of Programming is coding"....."The other 90% is DEBUGGING"
"Document my code????" .... "WHYYY??? do you think they call it CODE? "
Copyright © 1998-2022 PowerBASIC Tools, LLC - All Rights Reserved.
Powered by vBulletin® Version 5.7.0
Copyright © 2022 vBulletin Solutions, Inc. All rights reserved.
All times are GMT-5. This page was generated at 04:54 AM.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.