Bill Allombert on Sun, 05 Aug 2012 18:32:36 +0200


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

Re: Patch: default(sopath), default(outputsp[aces])


On Sun, Aug 05, 2012 at 02:32:34PM +0200, John Cremona wrote:
> I like the option of printing without spaces -- I have at least one
> script where I have to remove spaces afterwards using sed. 

Did you consider using
? default(output,0)
This should remove spaces.

> > 1) have two functions printsep() [ with \n ] and printsep1() [ without ],
> >
> > 3) allow user functions with a variable number of arguments and let the user
> > define his own variant.
> >
> > Allowing "varargs" user functions is obviously very desirable independently of
> > the printsep() feature, but it's currently not available, so not an immediate
> > option.

Only options 1 and 3 are consistent with the rest of the interface.
Now, if we allow user functions with a variable number of arguments, what would be the
syntax ? Maybe

f(a,b,c,v[])=
{
  print(a);
  for(i=1,#v,print(v[i]))
  
}

Cheers,
Bill.