Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.04.01;
Download: [xml.tar.bz2];

Down

Variables to save, and at startup return Find similar branches


interest   (2002-03-20 08:55) [0]

Dear experts!
How can I save variables (for example, to a text file) and then, for example, when I start some form, can I extract them from there?



Андрей Сенченко   (2002-03-20 09:04) [1]

IniFile.WriteString ()
IniFile.ReadString ()
.. well, and the rest of the procedures for working with INI files are intended for that.



Doom   (2002-03-20 09:15) [2]

Yes, it is with the help of TIniFile.
This is something like the Windows registry just does not allow you to do nested levels and the file size is not whiter than 64000
I did it myself. Very convenient - no need to perform positioning on the corresponding record. All these functions do. File format - open any * .ini to a toy for example and see how the records go there.



Андрей Сенченко   (2002-03-20 09:28) [3]

>> Doom © (20.03.02 09: 15)
>> only does not allow nested levels

Here, young man, you are very curiously mistaken. around December, at this conference, the creation of structured INI files was discussed. In short, the idea boiled down to the fact that the section header format allows the use of "." , eg:
[BLOCK1]
[BLOCK1.LEVEL1]
[BLOCK1.LEVEL2]
[BLOCK1.LEVEL3]
Unfortunately, the branch did not ripen, but you can ask the Masters or rummage through the archives. I wrote about this, if I remember correctly, McSimm ©

By the way - are you sure of the spelling of your last name in the questionnaire? :)



Song   (2002-03-20 09:30) [4]

I do not know, this TIniFile annoys me IMHO.
I prefer to record
Type Rec = Record
...
End;

Var ff: File of Rec;

Writes and reads faster than with TIni and less fuss.



Андрей Сенченко   (2002-03-20 09:36) [5]

>> Song © (20.03.02 09: 30)
>> I prefer to record Type Rec = Record

The program works, it works, then the klobity and collapsed, and even managed to figure out what to write to the settings save file. INI-hu then correct mono in notepad, but the typed file ...
But I usually do it too :)




panov   (2002-03-20 09:38) [6]

I do not like INI - you can simply use the TStringList class and its methods ...



Song   (2002-03-20 09:44) [7]

2Andrey Senchenko © (20.03.02 09: 36)
Usually, settings are saved in a typed file .. Not so much valuable data to be so upset that they will be lost. And in order not to get into trouble, you need to restore the default settings if the file is not found or corrupted, for example, by mistake in IOresult.



tovSuhov   (2002-03-20 09:51) [8]

I came across personal experience - in VIN98 (and I think in 95 as well) the size of the ini-file cannot exceed 64 kBytes. If more, TIniFile refuses to work with it. I did not check it in 2000, but it doesn't seem to be there ...



Doom   (2002-03-20 10:24) [9]

2 Andrey Senchenko

As for nesting - here you are absolutely right. I used a slightly different method.
Thanks for the Last Name. Tell me - how to change now?



panov   (2002-03-20 10:39) [10]

> Doom © (20.03.02 10: 24)
http://delphi.mastak.ru/anketa/



Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.04.01;
Download: [xml.tar.bz2];

Top





Memory: 0.58 MB
Time: 0.02 c
14-318
lel (a)
2002-02-15 14:41
2002.04.01
Why, in any society, there is always a class of dissatisfied. ??? 8 (((((


4-353
Rumrunner
2002-01-27 04:45
2002.04.01
Hello!


1-187
Aleksandr
2002-03-19 18:46
2002.04.01
Why is the keystroke not killed?


6-276
Sandro
2002-01-12 00:24
2002.04.01
How to transmit sound in real time through sockets


1-225
Vjar
2002-03-20 16:10
2002.04.01
Text hidden by asterisks





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic Indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Spanish swahili Swedish Thai turkish Ukrainian urdu Vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada Khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish