Page 1 of 1

RvTag variable type

Posted: Tue Mar 11, 2014 8:31 pm
by mohsen24000
hi,
why RvTag variable type changed from string to integer in new versions!?

Posted: Tue Mar 11, 2014 8:45 pm
by Sergey Tkachenko
On the contrary, it was changed from Integer to String.

The most applications used tags-are-pchars mode, where tags were pointers to dynamically allocated strings. Pointers, type casting, explicit memory allocation - all this stuff made application code unnecessarily complicated and was a source of bugs.
With String tags, code becomes much more simple and clean.
If you need storing integer values, you can use IntToStr and StrToInt.

There is a compiler define allowing to return integer tags, but I do not recommend using it.

Posted: Tue Mar 11, 2014 8:59 pm
by mohsen24000
yes, all right.
{$DEFINE RVOLDTAGS}