C++ jump statements in CINT are not supported?

C++ jump statements in CINT are poorely supported.
“continue” and “goto” practically not,
“break” works.

My script

for (…){

if (…){continue;
}else{break;}

}

Would be nice to have all of them in CINT.
regards, :slight_smile:

Hi,

Note that continue and break should work perfectly in non-optimized mode (issue the cint command .O 0).

Cheers,
Philippe.

in my script they are not working.
Dear Philippe, could you please explain what means:
“non-optimized mode (issue the cint command .O 0)”

I cannot find this in manual. This should simplify the script.
many thanks,
regards, A.I. :smiley:

Hi,

It is explained in the CINT documentation. You can see a list of CINT special command from the root prompt:[code] root [] .?

Note1: Cint is not aimed to be a 100%% ANSI/ISO compliant C/C++ language
processor. It rather is a portable script language environment which
is close enough to the standard C++.

Run: S : step over function/loop
s : step into function/loop
i : ignore and step over
c <[line]>: continue <to [line]>
e : step out from function
f [file] : select file to debug
b [line] : set break point
db [line] : delete break point
a [assert]: break only if assertion is true
O [0~4] : Set bytecode compiler mode
debug : bytecode status display on/off
asmstep : bytecode step mode on/off
status : show bytecode exec flags
dasm : disassembler
[/code].

So to use this with your script: root [] .O 0 root [] .L myscript.C root [] myfunction();

Cheers,
Philippe.

PS. Alternatively you can compile your script via ACliC: .L myscript.C+

thanks a lot, I should try all this.
regards, A.I.