home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a075 / 1.img / TOOLKIT1.EXE / SST57.PRG < prev    next >
Encoding:
Text File  |  1989-08-08  |  951 b   |  38 lines

  1. ********************
  2.  
  3. FUNCTION Attribute
  4.  
  5.    * to return the screen attribute byte for any given row and columns
  6.    * position to an already displayed screen.
  7.  
  8.    PARAMETERS _attrow, _attcol
  9.  
  10.    IF PCOUNT() != 2
  11.       RETURN(0)
  12.    ENDIF
  13.    IF TYPE("_attrow") + TYPE("_attcol") != "NN"
  14.       RETURN(0)
  15.    ENDIF
  16.  
  17.    * return a line of text from the given row position
  18.    * For the Autumn 86 release, this would be how
  19.    *
  20.    * PRIVATE _attscreen, _attchar
  21.    *
  22.    * _attscreen = ""
  23.    *
  24.    * SAVE SCREN TO _attscreen
  25.    * _attscreen = SUBSTR(_attscreen, (_attrow * 160) + 1, 160)
  26.    *               now give the attribute byte from the given column number
  27.    * _attchar = SUBSTR(_attscreen, ((_attcol * 2) + 2), 1)
  28.    *
  29.    * RELEASE _attscreen
  30.    *
  31.    * RETURN(ASC(_attchar))
  32.  
  33.    * Now, for the Summer '87, we have this:
  34.  
  35.    RETURN(ASC(SUBSTR(SAVESCREEN(_attrow, _attcol, _attrow, _attcol), 2, 1)))
  36.  
  37. * End of File
  38.