I tried to search for this in google, but the +=
part is ignored.
So I want to add some text to a variable:
Text := 'asdf';
Text := Text + 'ghijk';
This works fine, but for longer variable names, something like this would be nice:
Text := 'asdf';
Text += 'ghijk';
How can I do this?
There is no such operator available in the language.
For ordinal types you can use inc
and dec
but for all other types there is nothing.
For strings you can use TStringBuilder
to append to a text buffer. Although you may well conclude that, in many cases, is more hassle than it is worth.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With