READABLE_STRING_GENERAL lacks same_string

7 messages Options
Embed this post
Permalink
Colin Paul Adams

READABLE_STRING_GENERAL lacks same_string

Reply Threaded More More options
Print post
Permalink
I suggest we add a deferred routine:

same_string (a_other: READABLE_STRING_GENERAL) BOOLEAN is
   -- Is `a_other' the same sequence of codepoints as `Current'?
 require
  a_other_not_void: a_other /= Void
 deferred
 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
Emmanuel Stapf

Re: READABLE_STRING_GENERAL lacks same_string

Reply Threaded More More options
Print post
Permalink
Apart from the covariance, since descendant uses READABLE_STRING_32 or
READABLE_STRING_8 I have no issue with this.

Manu

> -----Original Message-----
> From: [hidden email] [mailto:freeelks-
> [hidden email]] On Behalf Of Colin Paul Adams
> Sent: Thursday, September 11, 2008 12:54 AM
> To: [hidden email]
> Subject: [freeelks-devel] READABLE_STRING_GENERAL lacks same_string
>
> I suggest we add a deferred routine:
>
> same_string (a_other: READABLE_STRING_GENERAL) BOOLEAN is
>    -- Is `a_other' the same sequence of codepoints as `Current'?
>  require
>   a_other_not_void: a_other /= Void
>  deferred
>  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
------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------  
Eric Bezault

Re: READABLE_STRING_GENERAL lacks same_string

Reply Threaded More More options
Print post
Permalink
I think that we should have at least a version without covariance.

--
Eric Bezault
mailto:[hidden email]
http://www.gobosoft.com



Emmanuel Stapf [ES] wrote:

> Apart from the covariance, since descendant uses READABLE_STRING_32 or
> READABLE_STRING_8 I have no issue with this.
>
> Manu
>
>> -----Original Message-----
>> From: [hidden email] [mailto:freeelks-
>> [hidden email]] On Behalf Of Colin Paul Adams
>> Sent: Thursday, September 11, 2008 12:54 AM
>> To: [hidden email]
>> Subject: [freeelks-devel] READABLE_STRING_GENERAL lacks same_string
>>
>> I suggest we add a deferred routine:
>>
>> same_string (a_other: READABLE_STRING_GENERAL) BOOLEAN is
>>    -- Is `a_other' the same sequence of codepoints as `Current'?
>>  require
>>   a_other_not_void: a_other /= Void
>>  deferred
>>  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
Eric Bezault-4

Re: READABLE_STRING_GENERAL lacks same_string

Reply Threaded More More options
Print post
Permalink
In reply to this post by Emmanuel Stapf
I think that we should have at least a version without covariance.

--
Eric Bezault
mailto:[hidden email]
http://www.gobosoft.com



Emmanuel Stapf [ES] wrote:
 > Apart from the covariance, since descendant uses READABLE_STRING_32 or
 > READABLE_STRING_8 I have no issue with this.
 >
 > Manu
 >
 >> -----Original Message-----
 >> From: [hidden email] [mailto:freeelks-
 >> [hidden email]] On Behalf Of Colin Paul Adams
 >> Sent: Thursday, September 11, 2008 12:54 AM
 >> To: [hidden email]
 >> Subject: [freeelks-devel] READABLE_STRING_GENERAL lacks same_string
 >>
 >> I suggest we add a deferred routine:
 >>
 >> same_string (a_other: READABLE_STRING_GENERAL) BOOLEAN is
 >>    -- Is `a_other' the same sequence of codepoints as `Current'?
 >>  require
 >>   a_other_not_void: a_other /= Void
 >>  deferred
 >>  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
Emmanuel Stapf

Re: READABLE_STRING_GENERAL lacks same_string

Reply Threaded More More options
Print post
Permalink
In reply to this post by Eric Bezault
The same kind as it was done for {STRING_GENERAL}.append which is renamed as
append_string_general in STRING_8 and STRING_32.

Manu

> -----Original Message-----
> From: Eric Bezault [mailto:[hidden email]]
> Sent: Wednesday, September 24, 2008 12:32 PM
> To: [hidden email]
> Cc: 'Colin Paul Adams'; [hidden email]
> Subject: Re: [freeelks-devel] READABLE_STRING_GENERAL lacks same_string
>
> I think that we should have at least a version without covariance.
>
> --
> Eric Bezault
> mailto:[hidden email]
> http://www.gobosoft.com
>
>
>
> Emmanuel Stapf [ES] wrote:
> > Apart from the covariance, since descendant uses READABLE_STRING_32 or
> > READABLE_STRING_8 I have no issue with this.
> >
> > Manu
> >
> >> -----Original Message-----
> >> From: [hidden email] [mailto:freeelks-
> >> [hidden email]] On Behalf Of Colin Paul Adams
> >> Sent: Thursday, September 11, 2008 12:54 AM
> >> To: [hidden email]
> >> Subject: [freeelks-devel] READABLE_STRING_GENERAL lacks same_string
> >>
> >> I suggest we add a deferred routine:
> >>
> >> same_string (a_other: READABLE_STRING_GENERAL) BOOLEAN is
> >>    -- Is `a_other' the same sequence of codepoints as `Current'?
> >>  require
> >>   a_other_not_void: a_other /= Void
> >>  deferred
> >>  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
------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------  
Colin Paul Adams

Re: READABLE_STRING_GENERAL lacks same_string

Reply Threaded More More options
Print post
Permalink
In reply to this post by Emmanuel Stapf
>>>>> "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
Emmanuel Stapf

Re: READABLE_STRING_GENERAL lacks same_string

Reply Threaded More More options
Print post
Permalink
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
------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------