comp.lang.ada
 help / color / mirror / Atom feed
From: Jerry <list_email@icloud.com>
Subject: Re: How to run a GNAT program without starting a terminal session
Date: Tue, 17 Jul 2018 14:56:23 -0700 (PDT)
Date: 2018-07-17T14:56:23-07:00	[thread overview]
Message-ID: <c5018fd5-fd29-4bb3-a07a-b31d34dac0cb@googlegroups.com> (raw)
In-Reply-To: <7461ada5-9bc3-43f5-98b0-b2930d9145bc@googlegroups.com>

On Tuesday, July 17, 2018 at 2:12:54 PM UTC-7, Shark8 wrote:
> On Tuesday, July 17, 2018 at 3:07:30 PM UTC-6, Jerry wrote:
> > 
> > I'm not sure exactly what is meant by a daemon but I think it is a faceless program that runs in the background over an extended period of time. Mine might satisfy that definition--it is faceless and runs until all of the several "delay-beep" pairs are executed, then quits.
> 
> My recommendation: use Ada's timing and tasking features.
> A lot of the cases I've seen where daemons are used/needed are because the language [PHP in this case] didn't have any notion of TASKs and DELAYs -- rather frustrating to come across when it's so trivially easy in Ada.

Thanks for that idea. I've never used a task before but I modified a little program from the new book, Introduction to Ada Programming, 2nd ed., as follows:


procedure Hello_World_Task is
    task type Hello_Task;
    
    task body Hello_Task is
    begin
            delay 4.0;
    end Hello_Task;
        
    Task_1 : Hello_Task;
begin
    null;
end Hello_World_Task;


It still runs in the terminal.

Jerry

  reply	other threads:[~2018-07-17 21:56 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-17  1:20 How to run a GNAT program without starting a terminal session Jerry
2018-07-17  4:35 ` Jerry
2018-07-17  9:55 ` AdaMagica
2018-07-17 10:08   ` Jerry
2018-07-17 10:23     ` Jerry
2018-07-17 13:13     ` Dennis Lee Bieber
2018-07-17 12:46 ` Björn Lundin
2018-07-17 16:20   ` Jeffrey R. Carter
2018-07-17 21:10     ` Jerry
2018-07-18  6:27       ` Jeffrey R. Carter
2018-07-19  1:41         ` Jerry
2018-07-19  2:31           ` Dennis Lee Bieber
2018-07-17 21:07   ` Jerry
2018-07-17 21:12     ` Shark8
2018-07-17 21:56       ` Jerry [this message]
2018-07-18  1:33         ` Shark8
2018-07-18  7:37       ` Björn Lundin
2018-07-18 16:41         ` Shark8
2018-07-18 21:18         ` Jeffrey R. Carter
2018-07-19  6:59           ` Jerry
2018-07-19 15:25             ` Dennis Lee Bieber
2018-07-19 16:50             ` Jeffrey R. Carter
2018-07-19 20:47               ` Jerry
2018-07-19  1:47         ` Jerry
2018-07-17 18:21 ` Shark8
2018-07-17 20:53   ` Jerry
2018-07-18 16:34     ` Shark8
2018-07-18 20:30       ` Björn Lundin
2018-07-18 21:09         ` Dan'l Miller
2018-07-18 21:41           ` Bill Findlay
2018-07-19  2:13             ` Dan'l Miller
2018-07-19  2:40           ` Jerry
2018-07-19  3:19             ` Dan'l Miller
2018-07-19  2:57 ` Jerry
2018-07-19  7:20   ` Björn Lundin
2018-07-19 11:30     ` Jerry
2018-07-19 16:40       ` Björn Lundin
2018-07-19 20:46         ` Jerry
2018-07-20  7:32           ` Björn Lundin
replies disabled

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