Forgot how to do this

View: New views
3 Messages — Rating Filter:   Alert me  

Forgot how to do this

by Chris Saunders-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have a class declared like this:

 

COMPLEX [G -> {NUMERIC rename is_equal as numeric_is_equal end, COMPARABLE}]

 

I want G to have to have a `default_create' and have forgotten the syntax
for correctly adding this.  Could anyone help?

 

Regards

Chris Saunders



[Non-text portions of this message have been removed]


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


Re: Forgot how to do this

by Simon Hudon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Chris,

I'm not sure I get your question right.  I'll assume that you want to be able to create an instance of G by using default_create as a creation procedure.  

You can do it by renaming the default_create procedure inherited by NUMERIC (or COMPARABLE) and adding `create whichever_version_of_default_create_you_want end'.  It should look somewhat like this:

COMPLEX [G -> {NUMERIC rename is_equal as numeric_is_equal, default_create as numeric_default_create end, COMPARABLE} create numeric_default_create end]

Does this solve your problem?

Simon

Chris Saunders-4 wrote:
I have a class declared like this:

 

COMPLEX [G -> {NUMERIC rename is_equal as numeric_is_equal end, COMPARABLE}]

 

I want G to have to have a `default_create' and have forgotten the syntax
for correctly adding this.  Could anyone help?

 

Regards

Chris Saunders



[Non-text portions of this message have been removed]


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@yahoogroups.com
    mailto:eiffel_software-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

RE: Forgot how to do this

by Chris Saunders-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey Simon

 

Thanks for the assistance Simon.  I actually finally managed to figure out
how to do this again by looking at the compiler error messages.  Here is
what I ended up with (other features have been added to the class):

 

                COMPLEX [G -> {NUMERIC rename is_equal as numeric_is_equal
end,

                               COMPARABLE rename

                                                default_create as
comparable_default_create,

                                                copy as comparable_copy,

                                                out as comparable_out,

                                                twin as comparable_twin

                                          end}

                               create default_create end]

 

Regards

Chris Saunders

 

From: eiffel_software@...
[mailto:eiffel_software@...] On Behalf Of Simon Hudon
Sent: Wednesday, April 23, 2008 2:43 PM
To: eiffel_software@...
Subject: Re: [eiffel_software] Forgot how to do this

 


Hi Chris,

I'm not sure I get your question right. I'll assume that you want to be
able to create an instance of G by using default_create as a creation
procedure.

You can do it by renaming the default_create procedure inherited by NUMERIC
(or COMPARABLE) and adding `create
whichever_version_of_default_create_you_want end'. It should look somewhat
like this:

COMPLEX [G -> {NUMERIC rename is_equal as numeric_is_equal, default_create
as numeric_default_create end, COMPARABLE} create numeric_default_create
end]

Does this solve your problem?

Simon

Chris Saunders-4 wrote:

>
> I have a class declared like this:
>
>
>
> COMPLEX [G -> {NUMERIC rename is_equal as numeric_is_equal end,
> COMPARABLE}]
>
>
>
> I want G to have to have a `default_create' and have forgotten the syntax
> for correctly adding this. Could anyone help?
>
>
>
> Regards
>
> Chris Saunders
>
>
>
> [Non-text portions of this message have been removed]
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
>

--
View this message in context:
http://www.nabble.com/Forgot-how-to-do-this-tp16824182s16963p16834757.html
Sent from the Eiffel Software Users mailing list archive at Nabble.com.

 



[Non-text portions of this message have been removed]


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/