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 

and() and rs() functions

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
johannes



Joined: 21 Jan 2011
Posts: 65
Location: Leimen, Germany

PostPosted: Sat Jun 11, 2011 10:06 am    Post subject: and() and rs() functions Reply with quote

In example file WINIOG.F95 I found the following line to get the RGB values from an integer v

i=winio@('RGB(%wd,%wd,%wd)%2nl ', and(v,255), and(rs(v,8),255),rs(v,16))

Who knows about documentation of and() and rs() ? Couldn't find it.
Back to top
View user's profile Send private message
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Sun Jun 12, 2011 3:20 am    Post subject: Reply with quote

Hi Johannes,

These functions (and several others) are minimally documented in the FTN95 helpfile (look under intrinsic functions). They are Salford Software extensions - they were documented in the FTN77 manual, if I remember correctly. Not sure why that documentation has not been "copied and pasted".

AND carries out a bitwise AND on two integer arguments and outputs the result.

RS (for Right Shift) shifts the bits of its first integer argument, to the right by the number supplied as its second argument,and outputs the result.

Andy
Back to top
View user's profile Send private message Send e-mail
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Tue Jun 14, 2011 5:20 pm    Post subject: Reply with quote

The FTN77 manual(s) were posted in the Documentation section of this site after a bit of prompting (and people offering digital copies of the files) some months ago. There are lots of very useful functions and subroutines that still form a part of FTN95, and every one I've tried to use does work (I suppose you must forget the primitive DOS style graphics and some of the DBOS DOS-extender stuff).

The manuals are worth looking at for ideas ....

Eddie
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 -> ClearWin+ 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