replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - ISHFT
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 

ISHFT

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



Joined: 18 Jan 2006
Posts: 11

PostPosted: Fri Dec 05, 2008 4:21 pm    Post subject: ISHFT Reply with quote

I have tried the following

INTEGER*1 i1Temp
i1Temp=-116
i1Temp=ISHFT(i1Temp,-1)

-116 should be 140 as an unsigned integer so I would expect 70 as the result (basically I am trying to do an unsigned divide by 2)

Compiled with Checkmate this comes up with the error arithmetic overflow
Compiled with Debug this doesn't throw up an error but it doesn't perform the operation.

Not sure why there is an error as a bit operation shouldn't result in arthmetic overflow?

Tried using RS instead of ISHFT and get the same result and error.

FTN95 version 5.10.0

Thanks

Mark Jordan
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Dec 05, 2008 4:46 pm    Post subject: Reply with quote

The help file says that you cannot use ISHFT in this way.

How about using positive INTEGER*2 values and then truncating to INTEGER*1? There are probably many other ways to do it.
Back to top
View user's profile Send private message AIM Address
MarkJordan



Joined: 18 Jan 2006
Posts: 11

PostPosted: Fri Dec 05, 2008 5:26 pm    Post subject: Reply with quote

Paul

Thanks - I missed that bit in the notes.

I have avoided INTEGER*2 as the source data is an unsigned INTEGER*1 binary file 14000 x 28000.

I have worked around the problem for now

Mark
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