comp.lang.ada
 help / color / mirror / Atom feed
* [request for advice] Please read, I can't come up with a short subj.
@ 1996-07-16  0:00 morphis
  1996-07-24  0:00 ` David Wheeler
  0 siblings, 1 reply; 3+ messages in thread
From: morphis @ 1996-07-16  0:00 UTC (permalink / raw)



Hi,
        Please bear with me, I will try to explain origin of the problem,
the problem itself and my capabilities.

        I have on occasion fell prey to MUDs (Multi-User Dungeons).  One
telnets in and interacts with game and with other users.  I have not been
satisfied with either the accuracy or various details of the way these have
been done.  So I decided to write one myself.  I hope to get a fairly
well intergrated alpha in about 2 years.

        One of the details to be dealt with is how to deal with objects
(chairs, tables, weapons, bodies, ...).  They will be kept track of via
object id #s.  I want to enumerate their
various properties (size, description, flamability...).  These properties
will sometimes be a number, sometimes text, sometimes a set of numbers.

        My problem is how to organize this in code.

        I am a system manager and have done a fair amount of programming.
(maybe a few thousand lines of code total, mostly in DCL)
I am not by any stretch of the imagination a hacker/guru/whatever.  I
have only the barest knowledge of object programming.

        I want to use this project to introduce myself to a few languages
probably Ada, C, C++ and PL/1. (ok so maybe it will take me 5 years
instead of 2...) object programing and to integrating different languages
in a single program.  (one reason for doing this is that I suspect I will
have other people writing significant parts of the MUD and they may not be
willing to learn ADA or whatever _I_ decide to write it in)

        At this embrionic stage I am looking for a reasonable naming
convention to use that stands a decent chance of making it into production.

        The brute force method I would use would be to make a
two dimensional array of characters :

object(oid,ci)="text"

where oid is the object id #, ci is the characteristic index # which is
mapped to a particular characteristic.  This is ok but keeping track of which
ci number refered to length and which to mass would be a pain, not to mention
having to parse through any characteristic that was an array.

Several years ago in a pascal program I saw a construct something like:

object.length(oid)
object.mass(oid)
...

I am completely ignorant of what this does.  But it looks like an
answer to my problem.  Does ADA have such a construct?  Does it have
any advantage over naming variables:

object_length(oid)
object_mass(oid)
...?

Any other ideas for a variable naming convention?
Suggestions for good books on object programming?
Other (printable-in-a-family-newspaper) suggestions?

Thanks for any help you can give me.

Robert
Morphis@physics.niu.edu




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-07-25  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-16  0:00 [request for advice] Please read, I can't come up with a short subj morphis
1996-07-24  0:00 ` David Wheeler
1996-07-25  0:00   ` morphis

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