Quantcast
Channel: Intel® Fortran Composer XE
Viewing all articles
Browse latest Browse all 1424

Character string allocation in elemental subroutine

$
0
0

If I build and run the attached program I get

Method 1:
   {Monday   }
   {Tuesday  }
   {Wednesday}
   {Thursday }
   {Friday   }
   {Saturday }
   {Sunday   }

but I don't understand why. I'd have thought that it should be

Method 1:
   {Monday}
   {Tuesday}
   {Wednesday}
   {Thursday}
   {Friday}
   {Saturday}
   {Sunday}

which I can get by using trim(n) on line 22. Could someone please explain to me why I get the first result. Thanks.

AllegatoDimensione
Downloaddaytime2_f.f902.74 KB

Viewing all articles
Browse latest Browse all 1424

Trending Articles



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