From: rross@postoffice.ptd.net (bob)
Subject: Help with project
Date: 1999/04/18
Date: 1999-04-18T00:00:00+00:00 [thread overview]
Message-ID: <371c09bd.16531847@news.ptd.net> (raw)
Hi, I am having a problem in trying to implement a program that
simulates
a waiting line queue in an airport, the workers are stored in an array
of
records, (the record will be the agent), each agent has a pointer to
their
line(type line_access),
I must declare a record for a customer in the generic spec , and
instantiate it in our source code, inside this record will be info
about
the customer(time in queue, etc),
now, below in the private area, I have
PRIVATE
TYPE line;
TYPE line_access IS ACCESS line;
TYPE line IS RECORD
info: X;
Next: line_access;
END RECORD;
TYPE Agent IS RECORD
Head:line_access;
cur_cust:line_access;
free_time:Integer;
etc(things for the agent)
END RECORD;
where X is the customer record which will instantiated
the problem is, i have subprograms in the source that wont compile
because
i cant access agent or any of its fields, unless i go through the
spec.
some of the subprograms are , checkagents-see if they are done
servicing
cur_cust
addtoqueue-adds a cust
removefromqueue-removes from head of link list, assigns that one to
cur_cust
if i put the subprograms to the body, then it cant find the fields for
the
customer
do u have any ideas what to do?
thanks for taking the time to read this
jarrod
Please reply to....
rossjar@db.erau.edu
next reply other threads:[~1999-04-18 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-18 0:00 bob [this message]
1999-04-19 0:00 ` Help with project Stephen Leake
1999-04-20 0:00 ` Ehud Lamm
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox