简体   繁体   中英

Logical Type and Select in Fortran

I have encountered the following statement in fortran:

  integer           iparam(11), ipntr(14)
  logical           select(maxncv)
  Double precision
 &                  ax(maxn), d(maxncv,3), resid(maxn), 
 &                  v(ldv,maxncv), workd(3*maxn), 
 &                  workev(3*maxncv), 
 &                  workl(3*maxncv*maxncv+6*maxncv)

Well, I can understand what integer , Double precision is.

But what about logical select ? What do they mean?

"logical" is a boolean type, which takes on only the values .TRUE. or .FALSE. The declaration creates a 1D array of name "select" of length "maxncv", just as the previous declaration creates an integer 1D array "iparam" of length "11".

The layout (eg, the continuation symbol on the start of continued lines) and the use of Double Precision suggest Fortran 77. For new code I recommend Fortran 95/2003.

logical is a datatype just like double precision is. select is a variable just like d is. maxncv is an array bound just like maxncv is.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM