You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question about how fprettify handles indentation over multiple #ifdef blocks. Here is a code snippet formatted with. $ fprettify --whitespace-comma --enable-decl -i 4 debug.f90
program hello
implicit noneinteger:: i, j, k
print*, "Hello, World!"
#ifdef THREEDSIM
do k =1, 2print*, "Hello, World!"
#elif defined(TWODSIM)
do j =1, 2print*, "Hello, World!"
#elsedo i =1, 2print*, "Hello, World!"
#endif
#ifdef THREEDSIM
end do
#elif defined(TWODSIM)
end do
#elseend do
#endifend program hello
You can see that subsequent do loops get indented every time, even though neither THREEDSIM nor TWODSIM are defined.
Is there a flag (I tried most of them and failed) that would result in code like this?
program hello
implicit noneinteger:: i, j, k
print*, "Hello, World!"
#ifdef THREEDSIM
do k =1, 2print*, "Hello, World!"
#elif defined(TWODSIM)
do j =1, 2print*, "Hello, World!"
#elsedo i =1, 2print*, "Hello, World!"
#endif
#ifdef THREEDSIM
end do
#elif defined(TWODSIM)
end do
#elseend do
#endifend program hello
If not, please point me to the place in fprettify where I should start looking to make this way of formatting code possible.
Thank you!
The text was updated successfully, but these errors were encountered:
Hi!
I have a question about how fprettify handles indentation over multiple
#ifdef
blocks. Here is a code snippet formatted with.$ fprettify --whitespace-comma --enable-decl -i 4 debug.f90
You can see that subsequent
do
loops get indented every time, even though neitherTHREEDSIM
norTWODSIM
are defined.Is there a flag (I tried most of them and failed) that would result in code like this?
If not, please point me to the place in
fprettify
where I should start looking to make this way of formatting code possible.Thank you!
The text was updated successfully, but these errors were encountered: