[m-rev.] for review: Print version information on two lines.

Peter Wang novalazy at gmail.com
Tue Mar 11 16:36:49 AEDT 2014


On Tue, 11 Mar 2014 16:27:03 +1100, Paul Bone <paul at bone.id.au> wrote:
> 
> >  :- pragma foreign_proc("Erlang",
> >  -    library.version(Version::out),
> >  +    library.version(Version::out, Fullarch::out),
> >       [will_not_call_mercury, promise_pure, thread_safe],
> >   "
> >  -    Version = << ?MR_VERSION "" configured for "" ?MR_FULLARCH >>
> >  +    Version = MR_VERSION
> >  +    Fullarch = MR_FULLARCH
> >   ").
> > 
> > ?s and ,
> 
> I don't know Erlang, I thought I was just writing assignment operators.
> 
> Is this correct?
> 
>     Version = << ?MR_VERSION >>
>     Fullarch = << ?MR_FULLARCH >>

Erlang syntax is also derived from Prolog so commas separate expressions
in a sequence.  This code should be correct but please test it:

    Version = << ?MR_VERSION >>,
    Fullarch = << ?MR_FULLARCH >>

Peter



More information about the reviews mailing list