home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 9.ddi / IOSTRSR1.ZIP / STIWORD.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.1 KB  |  35 lines

  1. /*[]------------------------------------------------------------[]*/
  2. /*|                                                              |*/
  3. /*|     stiword.cpp                                              |*/
  4. /*|                                                              |*/
  5. /*|     Class ios                                                |*/
  6. /*|          long& ios::iword( i )                               |*/
  7. /*|                                                              |*/
  8. /*[]------------------------------------------------------------[]*/
  9.  
  10. /*
  11.  *      C/C++ Run Time Library - Version 5.0
  12.  *
  13.  *      Copyright (c) 1990, 1992 by Borland International
  14.  *      All Rights Reserved.
  15.  *
  16.  */
  17.  
  18. #include <ioconfig.h>
  19. #include <iostream.h>
  20. #include "user.h"
  21.  
  22. // return user word as an integer
  23.  
  24. long _FAR & ios::iword(int i)
  25. {
  26.     static long l = 0;      // for error return
  27.     if( i < 1  ||  usercount < i )
  28.         return l;       // no such entry
  29.     if( i > nwords )
  30.         usersize(i);
  31.     return (i > nwords) ? l : userwords[i-1].lword;
  32. }
  33.  
  34.  
  35.