Reviewing all "Fortran" Wikipedia pages & improving Fortran imagery

They don’t for me anymore.

The punched card syndrome is mainly in Wikipedia pages.

Note also that I have updated the previous picture (oceans velocity and temperature) and the related post. The new one was well authored by the author, contrarily to the old one. It can now be used under CC-BY 4.0 license.

1 Like

A good opportunity for the German community: Golem.de: IT-News für Profis
@ivanpribec @awvwgk

Edit:
Wrong topic, I mixed this up with the more general ‘improve Fortran’s image’ thread

The section headings of the Wikipedia Fortran entry have been revised, in particular the concept of ‘Modern Fortran’ is now introduced.

Regards,
Mike

2 Likes

Thank you. Looking at the article, I see this code at the end:

program average

  ! Read in some numbers and take the average
  ! As written, if there are no data points, an average of zero is returned
  ! While this may not be desired behavior, it keeps this example simple

  implicit none

  real, dimension(:), allocatable :: points
  integer                         :: number_of_points=0
  real                            :: average_points=0., &
                                     positive_average=0., &
                                     negative_average=0.

  write (*,*) "Input number of points to average:"
  read  (*,*) number_of_points

  allocate (points(number_of_points))

  write (*,*) "Enter the points to average:"
  read  (*,*) points

  ! Take the average by summing points and dividing by number_of_points
  if (number_of_points > 0) average_points = sum(points) / number_of_points

  ! Now form average over positive and negative points only
  if (count(points > 0.) > 0) then
     positive_average = sum(points, points > 0.) / count(points > 0.)
  end if

  if (count(points < 0.) > 0) then
     negative_average = sum(points, points < 0.) / count(points < 0.)
  end if

  deallocate (points)

  ! Print result to terminal
  write (*,'(a,g12.4)') 'Average = ', average_points
  write (*,'(a,g12.4)') 'Average of positive points = ', positive_average
  write (*,'(a,g12.4)') 'Average of negative points = ', negative_average

end program average

Using my psychic powers, I predict that people will look at this code, write declarations similar to

integer :: number_of_points=0

in a procedure, unaware of implicit save, and be confused by their results. In any case it is pointless to initialize number_of_points, since it is read. I will replace it with the code below unless people object:

program average

  ! Read in some numbers and take the average
  ! As written, if there are no data points, an average of zero is returned
  ! While this may not be desired behavior, it keeps this example simple

  implicit none

  real    , allocatable :: points(:)
  integer               :: number_of_points
  real                  :: average_points, positive_average, negative_average

  write (*,*) "Input number of points to average:"
  read  (*,*) number_of_points

  allocate (points(number_of_points))

  write (*,*) "Enter the points to average:"
  read  (*,*) points

  ! Take the average by summing points and dividing by number_of_points
  if (number_of_points > 0) then
     average_points = sum(points) / number_of_points
  else
     average_points = 0.
  end if

  ! Now form average over positive and negative points only
  if (count(points > 0.) > 0) then
     positive_average = sum(points, points > 0.) / count(points > 0.)
  else
     positive_average = 0.
  end if

  if (count(points < 0.) > 0) then
     negative_average = sum(points, points < 0.) / count(points < 0.)
  else
     negative_average = 0.
  end if

  ! Print result to terminal
  write (*,'(a,g12.4)') 'Average = ', average_points
  write (*,'(a,g12.4)') 'Average of positive points = ', positive_average
  write (*,'(a,g12.4)') 'Average of negative points = ', negative_average

end program average

In my own code I would write

avg = sum(x)/max(1,size(x))

since sum(x) = 0 for a zero-sized array. Is that too tricky for a Wikipedia article?

1 Like

Under Obsolete Variants I see

Fortran 6 or Visual Fortran 2001 was licensed to Compaq by Microsoft. They have licensed Compaq Visual Fortran and have provided the Visual Studio 5 environment interface for Compaq v6 up to v6.1.[65]

Whoever wrote that has confused an IDE with a programming language. Did Microsoft pioneer any innovations in the language itself? I think the quoted text should be removed from the article.

Yes, there is the Visual Studio IDE and there is Visual Fortran using the Quickwin library for making GUIs in Fortran.
I remember the movement was:
Microsoft Fortran Powerstation => Digital Visual Fortran => Compaq Visual Fortran => Intel Visual Fortran

Microsoft and DIGITAL have been working closely to ensure that users of Microsoft Fortran PowerStation can easily upgrade to DIGITAL Visual Fortran 5.0. The DIGITAL compiler has been enhanced to provide compatibility with Microsoft Fortran PowerStation 4.0 and to include enhancements proposed in the ISO/ANSI Fortran 95 language standard. Because it shares the same integrated development environment, DIGITAL Visual Fortran 5.0 can be used with other Microsoft development tools that are integrated in Developer Studio, an integrated development environment.

We asked Microsoft about licensing their Visual Studio IDE for this, and they in turn proposed to license us not only the Visual Studio IDE but also their Fortran PowerStation product. While PowerStation was widely used on Windows, it wasn’t a big seller for Microsoft and they realized that it needed a lot of investment to keep up with the language standard. In 1997, DEC released DIGITAL Visual Fortran 5.0, aka “DVF”, which was our own compiler and RTL plus the Visual Studio IDE and other Microsoft bits such as QuickWin to maintain compatibility with PowerStation. To say it was a hit would be an understatement.

And the QuickWin library comes naturally from Microsoft. It was an extension to the language to write simple GUIs. Although I did not remember if it was possible to make graphics with Powerstation. I did not use it for long before moving to DVF.

I don’t remember having heard of Fortran 6…

We have added an animated gif by @lkedward in Wikimedia Commons, under license CC-BY 4.0:

and added it in the Fortran Wikipedia page (en and fr):
https://en.wikipedia.org/wiki/Fortran#Science_and_engineering

It is easy to add your Fortran pictures in Wikimedia Commons (but you need to create an account):
https://commons.wikimedia.org/wiki/Special:UploadWizard
You can put them in the category “Created with Fortran”:
https://commons.wikimedia.org/wiki/Category:Created_with_Fortran

1 Like

Searching “Fortran”, I see no punched cards in the top of Google (fr). But the most beautiful result is in Bing:


(although I still see a F77 fixed form source code)

Reddit still uses an ancient logo.

It could be worse (p…ed cards :grin:)
If you are on Reddit (I am not), may be you could launch a discussion: “Should we modernize our logo?”