forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Operand incompatible with opcode

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
RichardMay



Joined: 02 May 2006
Posts: 25

PostPosted: Fri Jan 19, 2007 1:59 pm    Post subject: Operand incompatible with opcode Reply with quote

When I compile the code below with the /check option I get an error message "Operand incompatible with opcode" at line 14. What does this mean? It is very old code and was OK with FTN95 4.9.1.

SUBROUTINE ACCTOG(MODE,IX,IVAL)
INTEGER*1 IBTOG4
COMMON/GUT4VB/IBTOG4(1024)
IF(MODE.EQ.1.AND.IX.LT.0)THEN
IF(IX.EQ.-1)THEN
CALL I1ZERO(IBTOG4,1024)
ELSE
NF=-IX
CALL I1ZERO(IBTOG4,NF)
ENDIF
GOTO 9999
ENDIF
IF(MODE.EQ.1)THEN
IBTOG4(IX)=IVAL
ELSE
IVAL=IBTOG4(IX)
ENDIF
9999 RETURN
END
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7928
Location: Salford, UK

PostPosted: Sat Jan 20, 2007 6:12 pm    Post subject: Reply with quote

This is a strange bug.

It only occurs with /check, not with /checkmate which is odd.

The checking process that is going wrong is to do with checking the type of the argument IVAL which has default type INTEGER*4, whilst IBTOG4 has type INTEGER*1.

We will investigate this. In the mean time, try using /checkmate instead or revert to an earlier version of FTN95.
Back to top
View user's profile Send private message AIM Address
RichardMay



Joined: 02 May 2006
Posts: 25

PostPosted: Mon Jan 22, 2007 11:34 am    Post subject: operand incompatible with opcode Reply with quote

I tried using /checkmate and the 1st routine worked. However, here is one that gives the same error with /checkmate. I have cut it down a lot so there are also some warnings about unused variables.

SUBROUTINE ADRCOL(IASTAR,NREP,ICOLD,ICNEW)
INTRINSIC CORE1,CORE2,CORE4
INTEGER*1 I1C,I1COLD,I1CNEW
INTEGER*2 I2C,I2COLD,I2CNEW
DATA NBYCOL/1/
IF(NBYCOL.NE.1)GOTO 200
IA=IASTAR
I1COLD=IABS(ICOLD)
I1CNEW=ICNEW
IF(ICOLD.GE.0)THEN
DO 10 I=1,NREP
I1C=CORE1(IA)
IF(I1C.EQ.I1COLD)CORE1(IA)=I1CNEW
IA=IA+1
10 CONTINUE
ENDIF
GOTO 9999
200 CONTINUE
IF(NBYCOL.NE.2)GOTO 400
IA=IASTAR
I2COLD=IABS(ICOLD)
I2CNEW=ICNEW
400 CONTINUE
9999 RETURN
END
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group