TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Proportional Font
Show HTML Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Igor Izvarin <[log in to unmask]>
Mon, 7 Dec 1998 23:11:43 +0300
text/plain (30 lines)
Hello to everybody,

I continue to ask questions!

Now I am writing the package working with polynomials:

Package POLYNOMIAL_PACKAGE is
Type POLYNOMIAL is private;
Procedure Print(...);
Procedure Dump(...);
...
private
...
end POLYNOMIAL_PACKAGE;

but I want to use polynomials with integer and floating coefficients. HOW
CAN I MAKE A GENERIC PACKAGE TO WORK WITH DIFFERENT TYPES OF COEFFICIENTS:

generic
        type COEFFICIENT is ???????
package ...
...
end;

Sorry for my stupid questions. I am novice in Ada programming.

Thank you for your time and help!

With best regards, Igor Izvarin.

ATOM RSS1 RSS2