Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the meaning of (/ ... /) in Fortran

Tags:

fortran

I don't know Fortran but have to inspect a part of a code written in this language. This code is full of lines similar to this:

matmul(recVecs2p, real((/ i1, i2, i3 /), dp))

I can't find semantics of (/ ... /) on Google, so I hope I will get an answer here.

like image 364
Igor Popov Avatar asked Dec 28 '25 08:12

Igor Popov


1 Answers

This appears to be a language feature that was introduced in Fortran 90.

A first hint is the mention of this syntax on the Wikipedia article on Fortran 95, where it is referred to as "array-valued constants (constructors)".

Chapter 4 of the Programmer's Guide to Fortran 90, 3nd [sic!] Edition has a little more information about (/ … /) in Chapter 4.1.4. (Due to the copyright statement I may not reproduce the relevant text passage here, but it's freely accessible through the above hyperlink.)

like image 116
stakx - no longer contributing Avatar answered Dec 30 '25 22:12

stakx - no longer contributing



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!