tags:

views:

49

answers:

2

Does an assignment of a real to a variable starting with I convert to integer?

real vx;
vx = 2.59808
ix = vx

is ix == 2?

A: 

as far as i know you need to cast real into integer.

but i not sure, if it is allowed in your language.

Syed Tayyab Ali
+2  A: 

As far as I know the type will be automatically converted.

You can turn of this error-prone behavior by specifying

IMPLICIT NONE

The "implicit none" statement forces the programmer to declare all variables. Otherwise the types will just be implicit and variables starting with i will be of type integer.

0xA3