We are adding `same_string' to READABLE_STRING_GENERAL. Thanks for the suggestion.
It makes the simplementation of `same_string' shorter and simpler in the various
descendants.
Regards,
Manu
> -----Original Message-----
> From: Colin Paul Adams [mailto:
[hidden email]]
> Sent: Wednesday, September 24, 2008 10:45 PM
> To:
[hidden email]
> Subject: Re: [freeelks-devel] READABLE_STRING_GENERAL lacks same_string
>
> >>>>> "Emmanuel" == Emmanuel Stapf [ES] <
[hidden email]> writes:
>
> Emmanuel> Apart from the covariance, since descendant uses
> Emmanuel> READABLE_STRING_32 or READABLE_STRING_8 I have no issue
> Emmanuel> with this.
>
> OK, that's a problem.
>
> So I propose the following:
>
> same_code_sequence (a_other: READABLE_STRING_GENERAL): BOOLEAN is
> -- Does `a_other' represent the same string as `Current'?
> require
> a_other_not_void: a_other /= Void
> local
> i, l_count: INTEGER
> do
> from
> Result := True
> i := 1
> l_count := count
> variant
> increasing_index: l_count - i + 1
> until
> not Result or i > count
> loop
> Result := code (i) = a_other.code (i)
> i := i + 1
> end
> end
>
> --
> Colin Adams
> Preston Lancashire
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
>
http://moblin-contest.org/redirect.php?banner_id=100&url=/> _______________________________________________
> freeelks-devel mailing list
>
[hidden email]
>
https://lists.sourceforge.net/lists/listinfo/freeelks-devel-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
freeelks-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freeelks-devel