Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Implicit none 1

Status
Not open for further replies.

Lloydone

Programmer
Jan 17, 2007
41
NZ
Hey all,
I find i get this error when i Define one of my varibles within a do loop :

if(varibale.gt.bin)exit
^
cf90-113 f90fe: ERROR FREQDISTRIB, File = ./freq.f95, Line = 40, Column = 11
IMPLICIT NONE is specified in the local scope, therefore an explicit type must be specified for data object "VARIBALE".

can anyone explain why?

Regards, Lloyd
 
Implicit none means there is no implicit typing. That means you need to declare all your variables before you use them. If you do not have an implicit statement, then variables beginning with I-N are integers, everything else is real.

You could have
Code:
implicit logical (b), complex (c-d), real (p-z), integer (i-o)
! this will override the implicit statement
real natural
bool will be logical
ccc, dec will be complex numbers
part, zebra, natural will be real
insect, ocra will be integer
 
Also check the spelling: may be, it was variable, not varibale?..
 
Nice thing about programming languages: as long as you are consistent, the spelling of variable names doesn't matter to the compiler or the working of the program. It only affects/annoys those who have to maintain the program.

I remember searching for dose (as in radioactive dosage) and not finding it because the coder had coded it as does. Minor typo but he was consistent throughout and the program worked.
 
I worked with someone who spelled "Geom(etry)" as "Goem(etry)".

Consistently...

Slydexia rules ko.
 
In this case (with IMPLICIT NONE): misspelling is a common error source. So it's not a language purity issue...

 
I think you hit the nail on the head ArkM, I did spell it wrong :(

I have learnt the error of my ways now,

thanks Team
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top