Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve formatting of examples in intrinsics section #399

Open
Beliavsky opened this issue Apr 8, 2024 · 1 comment
Open

Improve formatting of examples in intrinsics section #399

Beliavsky opened this issue Apr 8, 2024 · 1 comment

Comments

@Beliavsky
Copy link
Contributor

Beliavsky commented Apr 8, 2024

At https://fortran-lang.org/learn/intrinsics/array/#merge there is code

   write(*,*)merge (1.0, 0.0, k > 0)
   k=-2
   write(*,*)merge (1.0, 0.0, k > 0)

I think there should be a space after write(*,*) and should not be a space between a function name and its arguments, so the code should be

   write(*,*) merge(1.0, 0.0, k > 0)
   k = -2
   write(*,*) merge(1.0, 0.0, k > 0)

I think there should be spaces around equal signs but not just after opening brackets or just before closing brackets, so that

   tvals(1,:)=[  10, -60,  50 ]
   tvals(2,:)=[ -20,  40, -60 ]

becomes

   tvals(1,:) = [10, -60,  50]
   tvals(2,:) = [-20,  40, -60]

Ideally all code would be run through an auto-formatter to achieve this instead of having us fiddle with the code manually.

@RaheelaTabassum
Copy link

i would like to work on this issue please assign this to me @Beliavsky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants