comp.lang.ada
 help / color / mirror / Atom feed
From: "Andrew" <andrew@carroll-tech.net>
To: <comp.lang.ada@ada.eu.org>
Subject: conversion
Date: Sat, 28 Jun 2003 02:46:46 -0600
Date: 2003-06-28T02:46:46-06:00	[thread overview]
Message-ID: <mailman.24.1056788758.8204.comp.lang.ada@ada.eu.org> (raw)

The more I think about the string/unbounded_string inconvenience the
more I think about polymorphism.  Polymorphism helps readability in
some situations.  In the case of the 'utilities' functions I think
polymorphism
would provide a great service.

The "flavor" that char* and char[] as parameters in functions is that they
seem interchangeable.  I can pass a char* into a function declared to use
char[], and vice-versa.  It's not that way in Ada, most likely for a real
good
reason, but it would sure be nice if there were a way to make it seem that
easy in Ada.

Enter polymorphism.

If overloaded slice inside Unbounded package to return an unbounded_string
an unbounded_string would still need to be created.  I don't think there is
any
way around that part but having the overloaded slice function would bring a
type transparent feeling to using the slice function and many others as
well.
Polymorphism in this case would help.  One way to achieve polymorphism is to
overload the 'utility' functions.

That explains why I had the feeling of extending the functionality of the
Unbounded
package.  It doesn't seem complete.

-- In regard to separate compilation
>Better to use child packages. "is separate" is really an Ada 83
>feature; child packages in Ada 95 is a better way to structure things.
>Sometimes "is separate" is a good way to go, but rarely.
Is the "is separate" feature going away?

-- In regard to gnatmem
gnatmem says it will start a program and you can provide the
command line arguments to it.
"gnatmem <program> <arg1> <arg2>..."

So, I have a program fashionably called testprog that takes two
command line arguments; a path and a filename.  So I try to run
gnatmem (after compiling with debug flag) like:

"gnatmem testprog . testdata.txt"

Gnatmem then says that the program ended unexpectedly.  I can
run "testprog . testdata.txt" from the command line and it works
fine.

-- In regard to GNAT
>Hmm, this is confused. GNAT _is_ the Ada Core Technologies (ACT)
>compiler.
Ok, how about the IDE portion?

Thanks for the help all!

Andrew




             reply	other threads:[~2003-06-28  8:46 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-28  8:46 Andrew [this message]
2003-06-28  9:49 ` conversion Preben Randhol
2003-06-30 14:08 ` conversion Stephen Leake
     [not found] <002701c33e22$8e9deaf0$0201a8c0@win>
2003-06-29 20:15 ` conversion David C. Hoos, Sr.
  -- strict thread matches above, loose matches on Subject: below --
2003-06-29  9:41 conversion Andrew
2003-07-04 10:42 ` conversion Janeit
2003-06-27 17:37 conversion Andrew
2003-06-27 17:32 ` conversion Stephen Leake
2003-06-28  2:55 ` conversion Jeffrey Carter
2003-06-27 10:51 conversion Andrew
2003-06-27 12:22 ` conversion Dmitry A. Kazakov
2003-06-27 12:37 ` conversion Stephen Leake
2003-06-27 14:26   ` conversion Bill Findlay
2003-06-27 17:04     ` conversion Georg Bauhaus
2003-07-04  0:21     ` conversion Dave Thompson
2003-06-27 13:25 ` conversion Robert I. Eachus
2003-06-27 18:42   ` conversion tmoran
2003-06-27 14:49 ` conversion Matthew Heaney
2003-06-27 17:10 ` conversion Georg Bauhaus
2003-06-27 17:13 ` conversion Alexander Kopilovitch
2003-06-27 17:34   ` conversion Preben Randhol
2003-06-27 22:10     ` conversion Alexander Kopilovitch
2003-06-28  9:46       ` conversion Preben Randhol
2003-06-27 22:13   ` conversion Robert I. Eachus
2003-06-30  8:52     ` conversion Dmitry A. Kazakov
2003-07-03  7:03       ` conversion Robert I. Eachus
2003-07-09  7:42         ` conversion Dmitry A. Kazakov
2003-07-09 17:04           ` conversion Robert I. Eachus
2003-07-10 10:19             ` conversion Dmitry A. Kazakov
2003-07-11  1:56               ` conversion Alexander Kopilovitch
2003-07-05  2:40     ` conversion Alexander Kopilovitch
2003-07-05  6:33       ` conversion Georg Bauhaus
2003-07-05 17:06         ` conversion Alexander Kopilovitch
2003-07-06  3:53           ` conversion Robert I. Eachus
2003-07-06  5:13             ` conversion Jeffrey Carter
2003-07-06 12:45               ` conversion Chad R. Meiners
2003-07-07  1:09             ` conversion Alexander Kopilovitch
2003-07-06 20:04           ` conversion Georg Bauhaus
2003-07-07 14:55             ` conversion Stephen Leake
2003-07-07 21:36               ` conversion Alexander Kopilovitch
1998-07-22  0:00 conversion Rick
1998-07-22  0:00 ` conversion Richard Toy
1998-07-22  0:00 ` conversion Corey Ashford
1998-07-22  0:00   ` conversion Corey Ashford
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox