comp.lang.ada
  Home FAQ Contact Sign in
comp.lang.ada only
 
Advanced search
August 2008
motuwethfrsasuw
    123 31
45678910 32
11121314151617 33
18192021222324 34
25262728293031 35
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.ada Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Ada.Text_IO.Fixed_IO - strange prefix in output         


Author: Maciej Sobczak
Date: Aug 19, 2008 08:03

Consider:

with Ada.Text_IO;
with Ada.Calendar;

procedure A is

package Duration_IO is new
Ada.Text_IO.Fixed_IO (Ada.Calendar.Day_Duration);

D : Ada.Calendar.Day_Duration := 0.0;

begin
Duration_IO.Put (D);
end A;

The above program produces the following output:

N = 1
0.000000000

I use GNAT 3.4.6 (yes, that old). Was this a compiler/runtime bug?
The output from newer compiler contains only the number.

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com

Database Access Library for Ada: www.inspirel.com/soci-ada
no comments
  Ada in Debian 5.0 "Lenny"         


Author: Ludovic Brenta
Date: Aug 18, 2008 22:53

Debian 5.0 "Lenny" is due for release in September and has been frozen
since the end of July[1] but, due to lack of time on my part, some Ada
packages didn't make the deadline and are now in unstable. I
requested[2]
from the Debian release team an exception to the freeze so these packages
can migrate to Lenny and I am awaiting a response.

[1] http://lists.debian.org/debian-devel-announce/2008/07/msg00007.html
[2] http://lists.debian.org/debian-release/2008/08/msg00702.html

The new default Ada compiler is gnat-4.3. In addition to the many bug
fixes and enhancements in GCC 4.3.1[3], the version shipped with Debian
contains 19 bug fixes backported from the main line of development (GCC
4.4). This is the result of Samuel Tardieu's outstanding work. Debian
also pioneered support for mips, mipsel and ppc64 architectures thanks to
Xavier Grave, Aurelien Jarno and Andreas Jochens. This support will be
included in GCC 4.4. Finally, gnat-4.3 ships with two versions of the
Ada
run-time library: one using zero-cost exception handling (aka ZCX, both
static and shared libraries), and one using the setjump/longjump (SJLJ)
mechanism (static library only).
Show full article (3.76Kb)
no comments
  Call for SIGAda Award Nominations         


Author: John McCormick
Date: Aug 18, 2008 10:00

Dear Members of the Ada Community:

On Thursday, 30 October 2008, the 2008 SIGAda Awards will be presented
in a special morning plenary session at the SIGAda 2008 conference in
Portland, Oregon. (See http://www.acm.org/sigada/conf/sigada2008/ if
you have somehow missed announcements of this year's annual SIGAda
international conference.)

We welcome your nominations of deserving recipients.

The ACM SIGAda Awards recognize individuals and organizations who have
made outstanding contributions to the Ada community and to SIGAda.
The two categories of awards are:

(1) Outstanding Ada Community Contribution Award
-- For broad, lasting contributions to Ada technology & usage.

(2) ACM SIGAda Distinguished Service Award
-- For exceptional contributions to SIGAda activities & products.

Please consider who should be nominated this year. You may nominate a
person for either or both awards, and as many people as you think
worthy. One or more awards will be made in both categories.
Show full article (2.63Kb)
no comments
  Opening a file vs. creating if not yet exists         


Author: Maciej Sobczak
Date: Aug 18, 2008 08:03

Hi,

The Open procedure for opening files expects the given external file
to already exist (otherwise the Name_Error is signalled).

The Create procedure truncates the file no matter what, even if the
mode for opening a file is Append_File.

I find this a bit annoying for example with log files, where the
natural scheme should be:
- if the file exists, open and append to it
- if the file does not exist, create it and append to it

What is the recommended way to deal with this?

begin
Open (File, Append_File, "file.txt");
exception
when Name_Error =>
Create (File, Append_File, "file.txt");
end;

Is the above idiomatic (ie. well understood and accepted as common
practice)?
Show full article (0.82Kb)
4 Comments
  File "form" and mainstream systems.         


Author: Maciej Sobczak
Date: Aug 18, 2008 06:40

Hi,

There is a Form parameter in file creation/open procedures (for
example Ada.Sequential_IO.Create).
The corresponding function allows to retrieve the "form" for the file
object that is already open.

Is there any use for the file "form" on POSIX or Windows?

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com

Database Access Library for Ada: www.inspirel.com/soci-ada
no comments
  GTK Build from source         


Author: RasikaSrinivasan
Date: Aug 15, 2008 18:17

GPS 4.1.3 (20070913) hosted on pentium-mingw32msv
GNAT GPL 2007 (20070405-41)

All

The above is my GPS environment on a Windows XP laptop.

I downloaded the sources for gtkada today. I tried to build gtk with
the gpr files provided.

testgtk failed to build with the following error :
---------------------
cannot generate code for file view_gl.ads (package spec)
to check package spec for errors, use -gnatc
gnatmake: "c:\documents and settings\r srinivasan\my documents\projects
\tools\gtkada\sources\gtkada-2.10.2\gtkada-2.10.2\testgtk\opengl
\view_gl.ads" compilation error

process exited with status 4
=========================

gdialog failed to build with the following message :
Show full article (1.24Kb)
1 Comment
  GNAT 4.2.3 Ubuntu reports weird compile error wrt Unchecked_Access         


Author: Jerry
Date: Aug 15, 2008 13:26

I have a curious report from two members of the development team for
PLplot, a popular plotting package for which I have written bindings
in Ada. The project is mature enough that the team decided to enable
Ada by default when building, so I am concerned about the following e-
mail.

========== begin e-mail ============



This latest change to the Ada bindings causes a build error for me
with gnat 4.2.3 on Ubuntu.

plplot.adb:2751:37: non-local pointer cannot point to local object
The offending line is
PL_Pen_Labels(Index) := Temp_C_String'Unchecked_Access;



This must depend on the version of gnat since I don't see this error
for gnat 4.3.1-2 from Debian testing (and I presume Jerry didn't see
it for his gnat-4.3 version as well).

========= end e-mail ==============

I (Jerry) in fact did not see a problem on my OS X 4.3 compiler.
Show full article (1.47Kb)
9 Comments
  Ada Mode and GNAT Project files         


Author: deadlyhead
Date: Aug 14, 2008 21:50

This has been discussed before, specifically by Ludovic Brenta in
2005. <http://groups.google.com/group/comp.lang.ada/browse_thread/
thread/8ca2d617a0d92ff/2dad47ea5cfa17ed?lnk=gst&q=ada+mode+gnat+project
+files#2dad47ea5cfa17ed> I'm wondering if anything ever came of plans
to replace Ada Mode Projects with GNAT Projects. There are many
benefits to making this change, so I thought I'd ask if there was
anyone in the know.

I've sent a message to the emacs-ada-mode mailing list inquiring about
this and offering my help if Stephe is interested in incorporating
it. Maybe Ludovic could supply the work that he's already done to get
things started?

I appreciate all replies. I'll be starting my first large Ada project
soon, and this feature would be a huge help. Ada + Emacs is already
one of the best development environments out there as I'm sure you all
know. Tighter integration would make it even better.

--deadlyhead
6 Comments
  Trouble Using Asis Tools         


Author: Joe
Date: Aug 14, 2008 20:13

Hey I'm trying to use Asis for Gnat tools (gnatpp, gnatstub etc...) on
Ubuntu 8.04 and I get the following error message.

$gnatstub stub.ads
gcc: error trying to exec 'gnat1': execvp: No such file or directory
gnatstub: cannot create the tree file for stub.ads

$gnatpp anagram.adb
gcc: error trying to exec 'gnat1': execvp: No such file or directory
gnatpp: /home/joe/prog/ada/proj/anagram/anagram.adb is not a legal Ada
source

Thanks for the help

-Joe
2 Comments
  comp.lang.ada christian         


Author: Corey.Schmauder
Date: Aug 14, 2008 14:11

http://orange.googlebong.com

Austin Tolfree GoogleBong

img { border: 2px solid Black }

pre { font: 6pt/8pt }

p,blockquote { font: 16pt; font-family: verdana, arial, 'sans serif' }

h1,h2,h3,h4,ul { font-family: verdana, arial, 'sans serif'; font: 14p }

table,li,td { font-family: verdana, arial, 'sans serif'; font: 12p }

ul { list-style: disc }

ol { list-style: decimal }

body { background: "#EEEEEE" }

h1,h2,h3,h4,hr,p,ul,blockquote,pre { color:Black }

a:link { color:Blue }

a:visited { color:Blue }

a:active { color:"#008000" }

a:hover { color:"#008000" }

h1.header { padding:0em; margin:0 }

div.container { width:100%%; margin:0px; border:1px solid Black; line-height:150%% }

div.header,div.footer { padding:0.5em; color:white; background-color:Black; clear:left }

div.left { width:15%%; margin:0; float:left; padding:0; }
Show full article (1.08Kb)
no comments
1 2 3 4 5 6 7 8 9