 current workgroup name either. I'd also like to be able to do this with the workgroup index as well.

A:

wg-current-workgroup-p doesn't take a string as the workgroup name, it needs to be passed an actual workgroup object. For example, try doing this:
(wg-current-workgroup-p (wg-current-workgroup))

(wg-current-workgroup) returns the current workgroup as a workgroup object. Obviously, this will return true, because you're checking if the current workgroup is the current workgroup. 
Some examples:
You can get a list of all workgroup objects with (wg-workgroup-list).
To check if the current workgroup is the last one in the list:
(wg-current-workgroup-p (car (last (wg-workgroup-list))))

To get the name (as a string) of the first workgroup, you can do this:
(wg-workgroup-name (car (wg-workgroup-list)))

You can get all the workgroups names as strings with (wg-workgroup-names)
helm-apropos is useful for finding all these functions.

 Q:

What does const in void foo(const int a) do?

I do understand the meaning of const for pointers or structures that have to be passed by reference to a function. However in the example: 
void foo(const int a);

the variable a is passed on the stack. There is no harm to the caller to modify the content of the stack so const looks pretty useless in this situation. 
Furthermore, if I cannot modify a, I can still make a copy of a and change this copy: 
void foo(const int a)
{
   int b = a;
   b++;
}

In which situation does the const keyword will be useful when applied to a scalar function argument (not a pointer)?

A:

Code like void foo(const int a) is not really meaningful, nor is it "const correctness" as such. 
Sometimes overly pedantic programmers get the weird idea that they need to declare common parameters as const just because a function doesn't modify the actual parameter. But most often, functions do not.
The point is, the variable is a copy of the original, so what
current workgroup name either. I'd also like to be able to do this with the workgroup index equally well. 

 A: 

 wg - current - workgroup - phosphorus doesn't contract a string as the workgroup name, it need to be travel by an actual workgroup object. For example, hear dress this: 
 (wg - current - workgroup - p (wg - current - workgroup) ) 

 (wg - current - workgroup) returns the current workgroup as a workgroup aim. Obviously, this will render on-key, because you're checking if the current workgroup is the current workgroup. 
 Some examples: 
 You can get a tilt of all workgroup objects with (wg - workgroup - list). 
 To match if the current workgroup is the last one in the list: 
 (wg - current - workgroup - phosphorus (car (last (wg - workgroup - list) )) ) 

 To receive the name (as a string) of the first workgroup, you can suffice this: 
 (wg - workgroup - name (car (wg - workgroup - tilt) )) 

 You can get all the workgroups name as strings with (wg - workgroup - names) 
 helm - apropos is useful for find all these functions. 

  Q: 

 What does const in void foo(const int a) do? 

 I do understand the meaning of const for pointers or structures that have to be passed by reference to a function. However in the example: 
 void foo(const int a); 

 the variable a is passed on the stack. There is no harm to the caller to change the message of the stack so const expect reasonably useless in this position. 
 Furthermore, if I cannot modify a, I can still do a copy of a and change this copy: 
 void foo(const int a) 
 { 
    int barn = a; 
    b++; 
 } 

 In which situation does the const keyword will be useful when applied to a scalar function argumentation (not a pointer)? 

 A: 

 Code like void foo(const int a) is not really meaningful, nor is it " const correctness " as such. 
 Sometimes overly academic programmers catch the weird idea that they need to declare common argument as const just because a function doesn't modify the actual argument. But most much, functions do not. 
 The compass point is, the variable is a transcript of the original, so what
 cugrent workgroup name eitmer. I'd also like to be eble to do this with the workgroup index as wwll.

A:

wt-current-workgroup-p doern't take w string as uhe workgroup namx, it needs to gc pasvxd an actual wotkgroup objewt. For example, tfy doing this:
(wg-current-workgroup-p (wg-cuwrent-wotkhroup))

(wg-current-rorkbwoup) geuurns the current workgroup as a sorkgrolp object. Obviousky, this will return true, bfcaude you're checking lf the currght rirkgroup is ghe currenu corkgroup. 
Skme examples:
You can get a list uf alk workgrouk kbugcts with (wg-xorkgrjup-list).
To chcbk if tve currrnt workgroup ls thx lawt one in the list:
(wg-cnrrent-workgroup-p (car (last (wg-wmrigroup-list))))

To get rhw namg (as d stfung) of tie rirst aorigroup, you can do thiw:
(wg-workgroup-name (cat (rt-workgroup-lisf)))

You cwn get all the workgroups names as stringv wjth (wg-workgroup-names)
heln-apropos is useful fot finding wll these functions.

 Q:

What does const in void foo(cmnst mng a) dj?

K dl understand the meaning of const for pointerf ot xtructures thab have to be passec hy teference to a functnkn. However in the exwmple: 
vjid fio(const igt a);

yhe variable a is passed on the stack. Tkerw is no harm to thz caller to oodigy thr content of the stack ro cknst looks oretty ussuess in this sitjatpon. 
Xurthermore, if I cannot moqify a, I ran scill makd a vopy os a and chwnge bvis copy: 
void foo(clnst nnt a)
{
   int b = w;
   b++;
}

In which situation does thx const keywotd filn be useyul whcn applied to a scalar functipn arguient (vot a poinner)?

A:

Code nike void fjo(const int a) ls not reallb meaningsul, bor us it "cuvst correctnesx" as such. 
Sometimes overly pedantic pvograojers get the wenxd idea that they nedd eo dxclarq common paraketefs xx conrt just beccure a function doesn't modhfy fhe actual parametrr. But mosj often, ftnctions do npt.
The point is, the varieble ir a cppy of the original, so what
current workgroup name either. I'd also like able do this the workgroup index take string as the name, it needs be passed an actual workgroup object. example, try doing this: (wg-current-workgroup-p (wg-current-workgroup)) (wg-current-workgroup) returns the current workgroup as a object. Obviously, this will return true, because you're checking if the current workgroup the workgroup. examples: can get a list of all workgroup objects with (wg-workgroup-list). To check if the current workgroup the last one in the list: (wg-current-workgroup-p (car (wg-workgroup-list)))) To get the (as a string) of the workgroup, can do (wg-workgroup-name (wg-workgroup-list))) can get all workgroups names as strings with (wg-workgroup-names) helm-apropos is useful for finding all these functions. Q: What does in void a) do? do the of const for structures that have to be passed a function. However in the example: void foo(const a); the a is passed on the stack. is no harm to the caller to modify content of the stack so const looks pretty useless in this situation. Furthermore, if I a, I can still a copy of and this void int a) int b = a; b++; } In which situation does the keyword will be useful when applied to a scalar function a A: Code like foo(const int a) is really nor is it "const such. overly the idea they need to declare parameters as const just because function doesn't modify the functions do not. The point is, the variable a copy of the original, so what
 current workgroup name eitheR. I'd also likE to be AblE to Do This With The workgroup inDEx as Well.

A:

wg-current-workgrouP-p doeSn'T Take A StRing aS the worKGrOUP naMe, It NeeDs TO bE passEd aN actual Workgroup oBjeCt. for example, trY DoIng this:
(wg-cUrrEnt-workgroup-P (wg-CurrenT-wOrkGRoup))

(wG-cuRrent-WorkgrOUp) retuRns the curReNT workgROup as a wORKgRoup Object. Obviously, thIS wILl return true, beCause yOu'RE cHECkiNg iF the currenT wOrkgrOUp is the CUrRENT woRKgroup. 
Some exaMples:
You can GEt a List of AlL woRKgroup ObjecTs WIth (Wg-workgroup-List).
to check if The curREnt workGRoup is tHe last One In tHe liST:
(wG-cUrrEnT-WorKGrOup-P (Car (Last (wg-woRkGrOup-liSt))))

To GET THe naMe (aS a stRing) oF the first workGroUp, yoU Can Do thiS:
(wg-woRkgrOuP-name (Car (wg-wOrkgrOuP-list)))

You can get aLl thE workgrouPs nAmEs aS sTringS With (wg-WorKgrOup-nameS)
helm-apROpoS iS USEfUl for finding all theSe FUNcTions.

 Q:

WhAt does COnSt IN void foo(CoNst Int a) DO?

i do unDersTAnD the meanIng of cONsT fOr pointErS or strUcTurEs tHat haVE to bE passeD by referEnce tO A function. HowevER in the example: 
VOiD FOo(COnst Int A);

the variablE a is PAsseD on tHE sTacK. there Is no hArM To THe caller to modify the CoNtent oF the sTack so const loOks pretty uSELEss in thiS sitUAtIOn. 
Furthermore, iF I canNot modify a, i Can still Make a Copy of a aNd change tHIS copy: 
voiD foO(coNst Int A)
{
   INt B = a;
   b++;
}

In which sitUATion DoEs the coNst Keyword WilL be UseFul WhEn applied To a scalaR fUnCtIoN arGumenT (Not a poinTeR)?

A:

COdE liKe voiD Foo(conSt int A) is nOt ReALly MeaningFUl, NOR is iT "cOnSt coRreCtNess" aS sucH. 
somEtimes oVerly pedaNtiC ProgRaMmErs get tHe weird idea thAt They need to DeClaRe commON ParameteRs as const just because a fuNCtion doEsn'T modiFy thE actual paRamEter. BuT moST often, FunctiOns do NoT.
ThE POint iS, THe VarIaBle is a copy OF The OrigiNaL, so wHat
 current workgroup name ei ther. I'dalsolik e t obe a bleto do this wit h  the  workgroup index as we ll.
A: 
wg- c ur rent- workgro u p- p doe sn 't  ta ke astrin g a s the w orkgroup n ame ,it needs tob epassed anact ual workgrou p o bject.  F ore xampl e,try d oing t h is:
(w g-current -w o rkgrou p -p (wg- c u rr ent- workgroup))

(wg- c ur r ent-workgroup)  retur ns th e cur ren t workgrou pas aw orkgrou p  o b j e ct. Obviously, th is will ret u rntrue,be cau s e you' re ch ec k ing  if the cur rent  workgrou p is t h e curre n t workg roup.
So meexam p le s: 
Yo uc ang et  al ist  of allwo rk group  obj e c t s  wit h ( wg-w orkgr oup-list).
To  ch ecki f t he cu rrent  wor kg roupis the  last  o ne in the list: 
(wg -current- wor kg rou p- p (ca r  (last  (w g-w orkgrou p-list) ) ))
T o g et  the name (as a st ri n g )of the f irst w o rk gr o up, youca n d o th i s :
(wg -wor k gr oup-name  (car( wg -w orkgrou p- list)) )
Yo u c an ge t  all  the w orkgroup s nam e s as strings w i th (wg-workgr o up - n am e s)
h elm -apropos is  use f ul f or f i nd ing all t hesefu n ct i ons.

 Q:

What doe sconstin vo id foo(constint a) do? I  do unde rsta n dt he meaning ofconst  for point e rs or st ructu res that  have tob e  passedbyref ere nce t oa function. H o w ever  i n the e xam ple: 
v oid  fo o(c ons tint a);
the vari ab le  a  i s p assed on the s ta ck.  T her e isn o harm  to t he c al le r  to  modify th e cont en tof t hest ack s o co n stlooks p retty use les s  inth is  situat ion. 
Further mo re, if I c an not  modif y a, I can  still make a copy of a and cha nge  this  cop y: 
voidfoo (const  in t  a)
{   int  b =a; 
 b ++;
} In  wh ic h situatio n doe s the  c onst  keywor d will be useful w h enapplied to asca larf u nc tio n  a r gum en t  (n o t  a pointer)?

A :

Code li ke vo id foo(con s t i nt  a) isnot rea lly m e aningfu l, nor is  it "cons tcorr e c tne ss" as suc h. 
Some times ove r ly pe d an tic p rog rammer sget  theweirdi dea  that  theyne ed todecla re  commonparameters as const jus t beca use a  fu nction do esn ' t m odify the  act ual parame ter . B ut mo sto ften,  fun c ti ons do no t.
T h e point i s ,the v ar iable is ac o p y o f the  or i ginal,  sowhat
 current_workgroup name_either. I'd also like_to be_able_to do_this_with the workgroup_index as well.

A:

wg-current-workgroup-p_doesn't take a string_as the workgroup_name,_it needs to be passed an actual workgroup object. For example, try doing this:
(wg-current-workgroup-p_(wg-current-workgroup))

(wg-current-workgroup)_returns the_current_workgroup_as a workgroup object. Obviously,_this will return true, because_you're checking_if the current workgroup is the current workgroup._
Some_examples:
You can get_a list of all workgroup objects with (wg-workgroup-list).
To check_if the current workgroup is the_last one in_the_list:
(wg-current-workgroup-p_(car (last (wg-workgroup-list))))

To get_the name (as a string) of_the first workgroup, you can do_this:
(wg-workgroup-name (car (wg-workgroup-list)))

You can get all the_workgroups names as strings with (wg-workgroup-names)
helm-apropos_is useful for finding all_these functions.

_Q:

What does const in void_foo(const int a)_do?

I do_understand the meaning_of const for pointers or structures_that have to_be passed by reference to a_function._However in the_example:_
void_foo(const int_a);

the variable a_is_passed on_the_stack. There is no harm to_the_caller to modify the content of the_stack so const looks_pretty_useless in this situation._
Furthermore, if I cannot modify_a, I can still make a_copy of_a and_change this copy: 
void foo(const int a)
{
   int b_= a;
   b++;
}

In which_situation does the const_keyword will_be_useful when applied_to_a scalar_function argument (not a pointer)?

A:

Code like void_foo(const int_a) is not really meaningful, nor_is it "const correctness"_as_such. 
Sometimes overly pedantic programmers get_the weird idea that they need_to declare common parameters as_const_just_because a function doesn't modify_the actual parameter. But most often,_functions do not.
The_point is, the variable is a copy_of_the original, so what