Please post line generating error and a few previous lines.
Thanks very much for making me post it, because then I saw that the error was at line 783 and not at line 773... and there I had somefunction(x,)...i.e forgot a comma (is that english?).
But as I have posted it I have another question more about logic.
in the header file cmbcalc.h there is are the definitions:
-
bool infla;//true=inflation, false= seed
-
int go(Cosmos* cosmos,string name,ControlPanel&,bool interactive=false,bool infla=true);
-
In the file cmbcalc.cc the function go is defined:
-
int CmbCalc::go(Cosmos* cosmos,string name,ControlPanel& control, bool interactive, bool infla) {
-
-
(...about 100 lines...)
-
-
if (control.cmb) {
-
(...)
-
if (control.scalar && infla) {
-
(...)
-
// Loop over wavenumbers, calculating perturbations for each k-mode
-
for (int k = 1; k <= nk; ++k) oneK(k,cosmos,control,infla);
-
}
-
infla=false;
-
if (control.scalar && ! infla){
-
// Loop over wavenumbers, calculating perturbations for each k-mode
-
for (int k = 1; k <= nk; ++k) oneK(k,cosmos,control,infla);
-
-
}
-
if (! control.cmb) nk =0;
-
if (interactive) return nk;
-
}
-
return 0;
-
}
-
eventually where I'm not sure is when in another file it calls:
-
#include"cmbcalc.h"
-
void CmbMainWindow::spool() {
-
try {
-
int nk = cmbcalc->go(cosmos,"dudei",*control,true,true);
-
(...)
-
(The first true means interactive=true), the question is will the 2 loops (and initializations I didn't write) in go() be calculated or are they cut off because the condition interactive=true is satisfied and hence the function is stopped and returns just nk. I know thiis would be the case if the if(interactive) condition would come before the other three if-conditions. Thanks to anyone taking the time to understand my question!!!