Silverfrost Forums

Welcome to our forums

Error: not enough variables in Data statement

6 Feb 2008 6:02 #2749

Hi,

I have got a few questions. I am pointing it one by one..

  1. When i am trying to define an integer like this INTEGER JJ(4)/2,3,4,1/,KK(4)/3,4,1,2/
    its saying 'Not enough variables in DATA statement. Compilation
    abandoned'.

  2. My code is in fixed format. I have set the compiler options in plato like this to accept fixed format. Tools-->Command Line Options and there i have typed '/FIXED_FORMAT'. when i tried to compile a
    code its saying... warning 61 - Line has been truncated (line is longer than 72 characters)

  3. Can u please suggest whether this statement will work. REAL* 4 ANS; ANS .EQ. 'val'

Can u please help me with these issues.

Thanks, Ajith.

6 Feb 2008 7:06 #2751
  1. You can write this as:

       INTEGER JJ(4)/2,3,4,1/
       INTEGER KK(4)/3,4,1,2/
    

although this is not standard Fortran.

  1. In fixed format, statements appear in 'columns' 7 to 72.

  2. An '=' sign is used for assignment:

ANS = 42.0

Basically you need to get a book on standard Fortran. This forum does not aim to teach the basics of the language. Alternatively Plato provides access to tutorial help files that may be of assistance.

Please login to reply.