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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9023f3818c3c6a68 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-25 09:30:11 PST Message-ID: <3E80919F.7020106@cogeco.ca> From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Detecting the OS type before clearing screen References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 25 Mar 2003 12:27:59 -0500 NNTP-Posting-Host: 198.96.47.195 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1048613278 198.96.47.195 (Tue, 25 Mar 2003 12:27:58 EST) NNTP-Posting-Date: Tue, 25 Mar 2003 12:27:58 EST Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!torn!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:35689 Date: 2003-03-25T12:27:59-05:00 List-Id: Redy RAMAMONJISOA wrote: > hello, > Do someone now how can i detect on which operating system my binary > file is executed. I need to write a program in ada and in it, i have > to write a procedure which clear the screen. But i wish to use the > same source code for all systems targeted (MS Windows and Linux > families). I think that this is essential because as far as i know, > Ada does'nt have any build function which clear the terminal screen. > Thanks in advance Apart from the fact (as others have pointed out), you won't have a single binary, you can use a binding to Curses. Then compile with curses/ncurses on *NIX platforms, and use PDCurses for Windows. If you don't mind making it a CYGWIN executable (under Windows that is), you can use the ncurses library there as well. -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg