From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.178.205 with SMTP id bn13mr3452064qab.3.1365805723008; Fri, 12 Apr 2013 15:28:43 -0700 (PDT) X-Received: by 10.49.94.168 with SMTP id dd8mr1133463qeb.30.1365805722995; Fri, 12 Apr 2013 15:28:42 -0700 (PDT) Path: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!ca1no42941474qab.0!news-out.google.com!ef9ni31353qab.0!nntp.google.com!ca1no42941472qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 12 Apr 2013 15:28:42 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=24.74.165.254; posting-account=OorKfwoAAAAEG64-jj7QakHqbp6ymd2J NNTP-Posting-Host: 24.74.165.254 References: <7075541f-01b7-4cd4-997f-b0b8048f067d@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Marble Clock From: gattamaneni abhiram Injection-Date: Fri, 12 Apr 2013 22:28:43 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 3230 Xref: number.nntp.dca.giganews.com comp.lang.ada:181040 Date: 2013-04-12T15:28:42-07:00 List-Id: On Wednesday, April 3, 2013 5:14:07 AM UTC-4, Simon Wright wrote: > Eryndlia Mavourneen writes: >=20 >=20 >=20 > > On Tuesday, April 2, 2013 2:46:10 PM UTC-5, gattamaneni abhiram wrote: >=20 >=20 >=20 > >> Do I need to use timer functions in the program to depict the changes >=20 > >> in the places of the marbles in different trays? >=20 > > >=20 > > I believe that would be the simpler way to do it. Of course, you >=20 > > always can simulate the materials and workmanship of an actual clock >=20 > > with masses, gravitational acceleration, etc. :-) >=20 > > >=20 > > Note that the non-realtime timer in Ada is the "delay" statement: >=20 > > "delay 3.1", for example, will delay for 3.1 seconds. >=20 >=20 >=20 > You (gattameini) definitely should *not* use more than one timer >=20 > function (when_to_run :=3D when_to_run + 1.0; delay until when_to_run;), >=20 > for when the next marble is to enter the top tray. >=20 >=20 >=20 > IRL there will be a finite delay for the mechanism to click through any >=20 > carries that may be needed, but I very much doubt you're required to >=20 > simulate that. >=20 >=20 >=20 >=20 >=20 > BTW, people, did you notice how I trimmed the quoted part of this so >=20 > that it only contains the bit I'm actually replying to? You seem to be >=20 > Google Groups users, so you probably don't notice what a complete pig's >=20 > ear GG makes of quoting!!! Thank You for the help. I completed the coding part using stacks for the tr= ays and a Queue for the reservoir. I am stuck at a point, I need to determi= ne the number of 12-hour cycles the clock goes through before the marbles i= n the reservoir are back in their original order (relative to the number of input marbles used to fill the reservoir). Can y= ou help me with this?