mIRC Homepage
Posted By: littlecramp Which is better? - 18/07/03 06:44 AM
I make a dialog which have a lot of checkboxes options. My qs is will using set %state $did($did).state be better or using writeini to store the state and then later retrieve from $readini store in the corresponding file.

As all set %VARIABLE is store inside remote.ini, will it be slower as the variable get more and more
Posted By: LocutusofBorg Re: Which is better? - 18/07/03 08:18 AM
In the past it's happened that for some reason I still haven't figured out my variables got wiped. So I actually use a combination of both. On some scripts, I will store settings in variables until I quit mirc, then I write them to file, and on other scripts I'll write them to file when the dialog closes. The sooner you write em to file, the less chance there is of something happening to them. Although in the end the chance is very smll.
Posted By: littlecramp Re: Which is better? - 18/07/03 09:37 AM
Variable store using 'var' will be removed once the script end or unset.

Whereas variable store using 'set' will only be removed when it is unset or use with -uN switch
Posted By: LocutusofBorg Re: Which is better? - 18/07/03 10:13 AM
I know this. what I am saying is that he wouldn't be the first one to discover his variables created with /set were wiped after mirc crashed...
Posted By: littlecramp Re: Which is better? - 18/07/03 10:19 AM
but you didnt answer my qs!
Posted By: Watchdog Re: Which is better? - 18/07/03 10:31 AM
I use variables with no trouble at all. But the best way is to use what you know best. If you are gunna set a variable then store it in an ini file when closing then you may as well be using hash tables because they are fastereven if the amount of data is small.
Posted By: littlecramp Re: Which is better? - 18/07/03 10:37 AM
I still do not really know how to use hash table!
Posted By: Watchdog Re: Which is better? - 18/07/03 10:42 AM
They can be a bit confusing at first, but like anything practice makes perfect. grin
Posted By: pheonix Re: Which is better? - 18/07/03 11:36 AM
with the exception of picwins frown
© mIRC Discussion Forums