- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
i have some problem with the simples operations in the statements.
For examples if A(j) and B(j) are two INTEGER the compiler gives me ERROR ifI write "A(l)=B(n+m)" or "A(l)=B(n*m)".
I have also some errors when I define some variables with operation in the dimension definition: for example when I define the integer C like "integer*4 C(n*m)".
Is there any compiler option to able this operations?
Thanks,
Martino
i have some problem with the simples operations in the statements.
For examples if A(j) and B(j) are two INTEGER the compiler gives me ERROR ifI write "A(l)=B(n+m)" or "A(l)=B(n*m)".
I have also some errors when I define some variables with operation in the dimension definition: for example when I define the integer C like "integer*4 C(n*m)".
Is there any compiler option to able this operations?
Thanks,
Martino
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you post a small but complete sample that shows the problem? I can't quite figure out what you're doing from the description, and often the other declarations are needed to understand the problem. It would also help if you said what the error messages were.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error messages I have are for example:
...
PARAMETER N_CCD_BUF=MAX_X*MAX_Y
^
Error 157 at (28:ccdne_com.inc) : Evaluation overflow for the subexpression with this operator
....
....
COMMON /DATAXY/ I_XY(MAX_X*MAX_Y,N_CCD)
^
Error 157 at (161:ccdne_com.inc) : Evaluation overflow for the subexpression with this operator
....
where N_CCD_BUF is a INTEGER*4, and MAX_X and MAX_Y are INTEGER*2
....
parwt_b(IP+2) = ICHAR(i1+48)
^
Error 191 at (133:ccdne_inp_03.f) : This argument has either the wrong type or no type
....
where parwt_b is a INTEGER(1) with a dimension of 64 and IP and i1 are implicit integers.
I hope the problem will be more clear.
Thank you very much again,
Martino
...
PARAMETER N_CCD_BUF=MAX_X*MAX_Y
^
Error 157 at (28:ccdne_com.inc) : Evaluation overflow for the subexpression with this operator
....
....
COMMON /DATAXY/ I_XY(MAX_X*MAX_Y,N_CCD)
^
Error 157 at (161:ccdne_com.inc) : Evaluation overflow for the subexpression with this operator
....
where N_CCD_BUF is a INTEGER*4, and MAX_X and MAX_Y are INTEGER*2
....
parwt_b(IP+2) = ICHAR(i1+48)
^
Error 191 at (133:ccdne_inp_03.f) : This argument has either the wrong type or no type
....
where parwt_b is a INTEGER(1) with a dimension of 64 and IP and i1 are implicit integers.
I hope the problem will be more clear.
Thank you very much again,
Martino
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
While you don't show enough to be certain of this, it appears that you have given MAX_X and MAX_Y values such that their product doesn't fit in 15 bits. Also, you are using a non-standard version of PARAMETER (no parentheses), which would have had different interpretations on different (long past) compilers, and I never saw such a combination.
Apparently, your compiler objects to assignment of a default integer intrinsic function result to an integer(1), or something has happened to make the compiler ignore whatever declaration you used to make parwt_b an array.
As I doubt you still have a pre-f77 compiler with which you are trying to be compatible, it might be worth while to make this closer to standard Fortran.
Apparently, your compiler objects to assignment of a default integer intrinsic function result to an integer(1), or something has happened to make the compiler ignore whatever declaration you used to make parwt_b an array.
As I doubt you still have a pre-f77 compiler with which you are trying to be compatible, it might be worth while to make this closer to standard Fortran.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page