Bill Allombert on Mon, 06 Jun 2011 22:23:01 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: fullfactor is not loaded in 2.5.0

On Mon, Jun 06, 2011 at 11:45:10PM +0400, Max Alekseyev wrote:
> Dear Jeroen and pari-users,
> I'm trying to use fullfactor package from
> in the development version 2.5.0 of PARI/GP but it reports an error:
> ? \r
>   ***   unexpected ';': ...accum=accum+1);if(accum++;accum>=numaccum,my(
>   ***                                               ^--------------------
> So, my question is whether this is intended behavior and fullfactor has to
> be updated to work with PARI/GP 2.5.0, or something got broken and needs to
> be fixed in 2.5.0 instead.

As far as I know, using ';' in the condition of the 'if' statement is not valid
and never has been in a stable version. This worked in PARI 2.4.2 and 2.4.3 but
only as a side-effect of the implementation and this was not documented. This 
has been fixed in SVN 13155. Sorry for the trouble.

Beside this construct is ugly whereas the alternatives are much nicer:
if(accum++>=numaccum,...) or
accum++; if(accum>=numaccum,...)