Richard Robinson on Mon, 13 Aug 2018 03:23:47 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: pari gp synatx ';' and \ |
On Sun, Aug 12, 2018 at 12:39:47PM -0700, Richard Robinson wrote:
> Hello -
>
> I am having trouble understanding when and when not to use ';' and '\'. i
> think. Maybe it is something else I am having troubles with.
Hello Richard,
What you have trouble actually is with {}.
Normally, you should not use '\'.
Instead you should wrap your code with {} once:
{
for (year=1901,2000,
if(ordinal%7==0,totsun+=1);
ordinal+=january;
if(ordinal%7==0,totsun+=1);
if(leap(year),ordinal+=februaryl,ordinal+=february);
if(ordinal%7==0,totsun+=1);
ordinal+=march);
}
Cheers,
Bill.