On 11 Sep 2014, at 10:29, Stephen Leake <[email protected]> wrote:

> Ah. I did not realize 'not null' could occur without 'access'.
> 
> But we can also have 'in out not null'. That currently gives:
> 
>   procedure I
>     (A : in not null     Z_Access;
>      B : not null        Z_Access;
>      C : in out          Z_Access)
>   is begin
>      null;
>   end I;
> 
> When 'access' is present, 'not null access' is the mode, and aligns with
> 'in out'. But when 'access' is not present, 'not null' is part of the
> type. So perhaps it should be:

The LRM is pretty clear that mode := [in] | in out | out; - 6.1(16) - but I 
agree that ‘access’ is a special case (6.1(15)) and occurs in the place of mode.

>   procedure I
>     (A : in     not null Z_Access;
>      B :        not null Z_Access;
>      C : in out Z_Access)
>   is begin
>      null;
>   end I;
> 
> To make things worse, we can also have a 'not null access' parameter,
> which would give:
> 
>   procedure I
>     (A : in              not null Z_Access;
>      B :                 not null Z_Access;
>      C : in out          Z_Access;
>      D : not null access Z)
>   is begin
>      null;
>   end I;
> 
> which looks silly. But I hate special cases :).
> 
> 
> I've recently added support for 'aliased' in parameter lists, which is
> new in Ada 2012; it has to be before 'in out’.

We get a reasonable behaviour with

   procedure H (P1 :         access          Integer;
                P2 : aliased in out not null Integer_P;
                P3 :         not null access Integer);

   procedure I (P1 :         access          Integer;
                P2 : aliased in out not null Integer_P;
                P3 :         not null        Integer_P);

but I do wonder whether it’d be better to just left-justify whatever string of 
qualifiers is present within the space required by the longest. Will have a go 
at that.

>> # HG changeset patch
> 
> I gather you are using Mercurial. How does it compare to git and
> monotone, in your experience?
> 
> What front-end are you using?

There are probably all sorts of reasons for using monotone as one’s main VCS, 
but really for me it’s a step too far; yet another set of conventions to get to 
grips with. Likewise with git, which was designed (?) for use cases that I 
don’t have (and has a rude name into the bargain). And mtn has a rather limited 
set of hosting options, I think. And the Mac OS X version of mtn is stuck at 
0.48 (I tried to build from source, but got stuck in a morass of dependencies 
which slightly dented my confidence in the tool).

So the way I’ve dealt with ada-mode is, on pull, to sync with ada-france and 
then convert to hg; and in reverse, to create a patch set from the hg changes, 
apply that to the mtn workset, and sync back. Haven’t done that for a while, 
though.

   # Sync from ada-france; convert to Hg in ada-france.db-hg
   mtn sync --db ada-france.db www.ada-france.org
   hg convert --source-type mtn ada-france.db

I can’t remember why I didn’t convert to dvcs; you remind me to have another 
look. I use the command line except when checking in a single-file change. I’d 
be happy if emacs vcs would allow me to mark a set of files in the vc-dir 
display and check them in as one changeset … !!!!! thanks for the kick - I can 
do just that.
_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org

Reply via email to