szaghi / FLAP

Fortran command Line Arguments Parser for poor people
151 stars 34 forks source link

Reduce the number cycles when parsing #23

Closed victorsndvg closed 9 years ago

victorsndvg commented 9 years ago

Hello Stefano,

I was looking through the code searching for a bug (I will report it now) and I see that in:

https://github.com/szaghi/FLAP/blob/b135fb872a3c6c9cc9b0e572f639f218fd86cbb1/src/Data_Type_Command_Line_Interface.F90#L1193

The loop continues even after finding the switch in the CLI. The suggestion is to force to stop the loop at this point. I think this would reduce the complexity.

What do you think?

Best regards, Víctor.

szaghi commented 9 years ago

You are right, but I have just strongly refactored this procedure (indeed all procedures).

I am uploading my testing version into a new version on Github repo, so you can see my progress, but this version has a very testing status...

szaghi commented 9 years ago

Now the procedure is inside the CLAg group and there is the exit statement for reducing the number of cycles:

https://github.com/szaghi/FLAP/blob/master/src/Data_Type_Command_Line_Interface.F90#L1212

victorsndvg commented 9 years ago

Good job! Sorry I think I've been very impatient ;)

szaghi commented 9 years ago

No, you are great!

I am too slow... but I am very busy.