On Sat, Oct 22, 2022 at 6:08 PM Sven Schreiber
<sven.schreiber(a)fu-berlin.de> wrote:
Am 22.10.2022 um 14:57 schrieb Cottrell, Allin:
On Fri, Oct 21, 2022 at 8:22 PM Federico Fiorani <deferoci(a)gmail.com> wrote:
Dear all,
Gretl on my Windows crashes running this script
<hansl>
strings s = null
s += "text"
s -= "text"
</hansl>
Thanks for the report, Federico. That should now be fixed in git, with
snapshots to follow shortly.
Thanks, Allin, but after Artur's intervention it's not clear to me whether
"-=" is officially supported or not? And if it is (for which I'm not
pushing), would it remove all occurrences or just the first one?
Yes, it's officially supported (the relevant Guide chapter now
reflects this). But it only works for arrays of strings, and it
removes all occurrences from the array.
I've also documented the use of a negative index with arrays: this
works to remove an element from an array of any type, For example, one
can use
A = A[-2]
to remove the second element from array A.
Allin