Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

More problems with LBOUND and UBOUND

$
0
0

Ok, this pretty well nails it -

This simplified test case shows what happens when I have a lower dimension of ZERO,

for both the INPUT arrays AND the OUTPUT array. Using one dimensional arrays for simplicity.

Apparently the CALLED routine does not give the correct values for LBOUND and UBOUND.

It crashes thinking that the lower dimension is ONE, not Zero.

The upper dimension is also off by ONE, it should be 5, not 6.

BTW, the Fortran texts you referred to do not accurately portray the actual

behavior of the compiler, they portray the way it is SUPPOSED to work.

So, who is right?

If there is something subtle I missed, it sure never gets properly explained as far as I can tell.

Maybe the pre Fortran 95 approach would work better?

 

The problem goes away when I explicitly give the lower dimensions of ZERO.

AttachmentSize
Downloadtest49_0.f90830 bytes

Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>