This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: g77 future / proposed extension


From: "Grant Petty" <gpetty@precip.eas.purdue.edu>
>
> > Jamie Lokier wrote:
> >
> > > Grant Petty wrote:
> >
> > > > Clearly, other languages could benefit from this as well, and
some (such
> > > > as C++) might even be able to accommodate my ideas without
actually
> > > > extending the language itself.
> >
> > > Yes, it has been done in C++.  I implemented that sort of thing
twice in
> > > C++.  It's very nice to use.
>
> Thanks for your earlier response.  What you describe is very
interesting,
> and I would love to see a simple example program in C++ if one is
> available.

I've written a simple implementation of the idea; you can grab it from
ftp://animal.ihug.co.nz/pub/measure.tgz . There are any number of
features that could be added to it (notably, the ability to write mixed
expressions involving quantities based on different scalar types), but
it illustrates the concept.

Ross Smith <ross.s@ihug.co.nz> The Internet Group, Auckland, New Zealand
========================================================================
    "Be careful about using the following code -- I've only proven
    that it works, I haven't tested it."           -- Donald Knuth



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]