RvTag variable type

General TRichView support forum. Please post your questions here
Post Reply
mohsen24000
Posts: 75
Joined: Fri Jan 06, 2012 8:13 pm

RvTag variable type

Post by mohsen24000 »

hi,
why RvTag variable type changed from string to integer in new versions!?
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
mohsen24000
Posts: 75
Joined: Fri Jan 06, 2012 8:13 pm

Post by mohsen24000 »

yes, all right.
{$DEFINE RVOLDTAGS}
Post Reply