Silverfrost Forums

Welcome to our forums

and() and rs() functions

11 Jun 2011 9:06 #8379

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.

12 Jun 2011 2:20 #8383

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

14 Jun 2011 4:20 #8414

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

Please login to reply.