Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

fortran code returning ****

debolina123
Beginner
764 Views

Hi,

I have compiled a fortran code using Fortan compiler 9.1 029. Sometime the value that I get is **** instead of digits. If I run the program again I might not get the **** and get the real value.

I am not familiar with fortran at all. I am using a fortran dll to integrate in my program. Can someone help me with a possible explanation for the ***** value.

Thanks,

Debolina

0 Kudos
3 Replies
kooka
Beginner
764 Views
where do you get that result, if it is in a edit box, you probably need to give fotmat to the real number whit write(unit,format) io-list , where format is the fotmat of the output variable, like f5.3 for a real number with five digits and 3 decimals, i think your problem is that you can't display enough digits in your edit box, so reduce the number of digits in the format or make your edit box bigger. I hope this be helpful
0 Kudos
debolina123
Beginner
764 Views

I write it to a txt file.

Thanks for the suggestion

0 Kudos
Les_Neilson
Valued Contributor II
764 Views

When the number you want to write is bigger than will fit in the format, then you get ****
For example if you have an integer I=12345 and a format of (I4) the format has room for only 4 digits (printing a value up to 9999) but I is too big to fit.
You will need to increase the format, or if possible use (I0) which will use as many digits as is needed to print the value.

Les

0 Kudos
Reply