Re: Strategy for optionally excluding a named method parameter?

2020-04-27 Thread David Karr
On Sun, Apr 26, 2020 at 5:43 PM Peter McNeil wrote: > G'day David > > On 25/4/20 6:17 am, David Karr wrote: > > Lately my only Groovy work is scripted pipelines in Jenkins, version > > 2.89.4 . > > > > I'm working with an api that is somewhat dumb in one respect. The > > method we call takes

Re: Strategy for optionally excluding a named method parameter?

2020-04-26 Thread Peter McNeil
G'day David On 25/4/20 6:17 am, David Karr wrote: Lately my only Groovy work is scripted pipelines in Jenkins, version 2.89.4 . I'm working with an api that is somewhat dumb in one respect.  The method we call takes ~25 parameters.  We send them as named parameters. One of the parameters is

Re: Re: Re: Strategy for optionally excluding a named method parameter?

2020-04-26 Thread David Karr
; > > > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for > Windows 10 > > > > *From: *David Karr > *Sent: *Sunday, April 26, 2020 11:34 AM > *To: *users@groovy.apache.org > *Subject: *Re: Re: Strategy for optionally excluding a named method

RE: Re: Re: Strategy for optionally excluding a named method parameter?

2020-04-26 Thread Rathinavelu
ent from Mail for Windows 10 From: David KarrSent: Sunday, April 26, 2020 11:34 AMTo: users@groovy.apache.orgSubject: Re: Re: Strategy for optionally excluding a named method parameter?  On Sat, Apr 25, 2020 at 10:42 PM Rathinavelu <rathinav...@gmail.com> wrote:Sir,  I do not understand the NEED

Re: Re: Strategy for optionally excluding a named method parameter?

2020-04-26 Thread David Karr
gain to describe what I have "correctly pointed out". *Sent: *Sunday, April 26, 2020 9:00 AM > *To: *users@groovy.apache.org; David Karr > *Subject: *Re: Strategy for optionally excluding a named method parameter? > > > > It’s doing what you programmed it to do. &

RE: Re: Strategy for optionally excluding a named method parameter?

2020-04-25 Thread Rathinavelu
. They are combined here. Those are the problems addressed. First line of my mailBoth named and varagsays that.  Sent from Mail for Windows 10 From: CFoutsSent: Sunday, April 26, 2020 9:00 AMTo: users@groovy.apache.org; David KarrSubject: Re: Strategy for optionally excluding a named method parameter? It’s

Re: Strategy for optionally excluding a named method parameter?

2020-04-25 Thread CFouts
what you have      string false string true From: Rathinavelu Reply-To: Date: Saturday, April 25, 2020 at 9:23 PM To: "users@groovy.apache.org" , "users@groovy.apache.org" , David Karr Subject: RE: Re: Strategy for optionally excluding a named method param

RE: Re: Strategy for optionally excluding a named method parameter?

2020-04-25 Thread Rathinavelu
n the middle perhaps  is “invisible input”. Last output has no [null]T.Rathinavelu Sent from Mail for Windows 10 From: MGSent: Sunday, April 26, 2020 5:00 AMTo: users@groovy.apache.org; David KarrSubject: Re: Strategy for optionally excluding a named method parameter? Hi David,since, as was mention

FW: RE: Re: Strategy for optionally excluding a named method parameter?

2020-04-25 Thread Rathinavelu
  Sent from Mail for Windows 10 From: RathinaveluSent: Sunday, April 26, 2020 5:29 AMTo: users@groovy.apache.orgSubject: RE: Re: Strategy for optionally excluding a named method parameter? Sirs, 1.We need both named parameters implemented through map and, also varags if we want to call

RE: Re: Strategy for optionally excluding a named method parameter?

2020-04-25 Thread Rathinavelu
e:false)    g(one:true) The output is : true falseThanking you,T.RathinaveluSent from Mail for Windows 10 From: MGSent: Sunday, April 26, 2020 5:00 AMTo: users@groovy.apache.org; David KarrSubject: Re: Strategy for optionally excluding a named method parameter? Hi

Re: Strategy for optionally excluding a named method parameter?

2020-04-25 Thread MG
Hi David, since, as was mentioned, named parameters are implemented as a map underneath in Groovy, you should be able to remove the map entry of the parameter you do not want to pass, though I did not try this myself... Cheers, mg On 25/04/2020 20:57, David Karr wrote: On Sat, Apr 25,

Re: Strategy for optionally excluding a named method parameter?

2020-04-25 Thread David Karr
On Sat, Apr 25, 2020 at 2:00 AM Rathinavelu wrote: > Named parameters are not available in Groovy, say, as in Python., though > they say it is. Groovy has only mapped parameters. The earlier mail works > for a single ‘named’ parameter; if there are more parameters Groovy does > not work as

RE: Strategy for optionally excluding a named method parameter?

2020-04-25 Thread Rathinavelu
Named parameters are not available in Groovy, say, as in Python., though they say it is. Groovy has only mapped parameters. The earlier mail works for a single ‘named’ parameter; if there are more parameters Groovy does not work as ‘expected’; it treats them only as positional parameters.Kindly

RE: Strategy for optionally excluding a named method parameter?

2020-04-24 Thread Rathinavelu
Sir, I find no problem.groovy> def f(boolean b) { println b} groovy> f(b=false)  // namedgroovy> f(b=!false) groovy> boolean bb = 7==70 groovy> f(b=bb) groovy> bb = 7==7 groovy> f(b=bb)  falsetruefalsetruePerhaps I do not understand the situation. May you  kindly post me the failing