comp.lang.ada
 help / color / mirror / Atom feed
From: gattamaneni abhiram <abhiram.gattamaneni@gmail.com>
Subject: Re: Marble Clock
Date: Fri, 12 Apr 2013 15:28:42 -0700 (PDT)
Date: 2013-04-12T15:28:42-07:00	[thread overview]
Message-ID: <e3763890-38c3-4fe2-a776-726e77f53528@googlegroups.com> (raw)
In-Reply-To: <lyobdwgen4.fsf@pushface.org>

On Wednesday, April 3, 2013 5:14:07 AM UTC-4, Simon Wright wrote:
> Eryndlia Mavourneen <eryndlia@gmail.com> writes:
> 
> 
> 
> > On Tuesday, April 2, 2013 2:46:10 PM UTC-5, gattamaneni abhiram wrote:
> 
> 
> 
> >> Do I need to use timer functions in the program to depict the changes
> 
> >> in the places of the marbles in different trays?
> 
> >
> 
> > I believe that would be the simpler way to do it.  Of course, you
> 
> > always can simulate the materials and workmanship of an actual clock
> 
> > with masses, gravitational acceleration, etc.  :-)
> 
> >
> 
> > Note that the non-realtime timer in Ada is the "delay" statement:
> 
> > "delay 3.1", for example, will delay for 3.1 seconds.
> 
> 
> 
> You (gattameini) definitely should *not* use more than one timer
> 
> function (when_to_run := when_to_run + 1.0; delay until when_to_run;),
> 
> for when the next marble is to enter the top tray.
> 
> 
> 
> IRL there will be a finite delay for the mechanism to click through any
> 
> carries that may be needed, but I very much doubt you're required to
> 
> simulate that.
> 
> 
> 
> 
> 
> BTW, people, did you notice how I trimmed the quoted part of this so
> 
> that it only contains the bit I'm actually replying to? You seem to be
> 
> Google Groups users, so you probably don't notice what a complete pig's
> 
> ear GG makes of quoting!!!

Thank You for the help. I completed the coding part using stacks for the trays and a Queue for the reservoir. I am stuck at a point, I need to determine the number of 12-hour cycles the clock goes through before the marbles in the reservoir are back in their original order
(relative to the number of input marbles used to fill the reservoir). Can you help me with this?


  parent reply	other threads:[~2013-04-12 22:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02  0:09 Marble Clock gattamaneni abhiram
2013-04-02 12:02 ` John B. Matthews
2013-04-02 19:46   ` gattamaneni abhiram
2013-04-02 19:54     ` Eryndlia Mavourneen
2013-04-03  9:14       ` Simon Wright
2013-04-03 12:45         ` Eryndlia Mavourneen
2013-04-03 16:53         ` Simon Wright
2013-04-12 22:28         ` gattamaneni abhiram [this message]
2013-04-13  5:51           ` Simon Wright
2013-04-13 19:04           ` Dennis Lee Bieber
2013-04-03 11:52     ` John B. Matthews
2013-04-03  7:44 ` Mike H
replies disabled

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