No, strings are not necessarily unique. The places where a direct compare
occurs are safe because these are places where the interpreter itself set
the value being tested. A null string is not necessary unique either,
though there are lots of places where the global version is returned if a
null string is generated.

Rick


On Sat, Apr 18, 2020 at 12:14 PM Erich Steinböck <erich.steinbo...@gmail.com>
wrote:

> The interpreter doesn't guarantee that String objects are unique, i. e. at
> most one copy of e. g. a string "FUNCTION" can exist, does it?
>
> Most of the interpreter code uses strCompare(GlobalNames::NNN), but there
> are rare exceptions doing a direct compare like == GlobalNames::NULLSTRING
> or == GlobalNames::FUNCTION.
>
> Is a null string always unique?
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to