home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c081_11 / 9.ddi / CHAPXMPL.ZIP / CALLCT.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-13  |  613 b   |  22 lines

  1. // Turbo Assembler    Copyright (c) 1991 By Borland International, Inc.
  2.  
  3. // CALLCT.CPP
  4. // Program to invoke the LineCount function in COUNT.ASM.
  5.  
  6. // From the Turbo Assembler Users Guide - Interfacing Turbo Assembler
  7. //                                         with Borland C++
  8.  
  9. char * TestString="Line 1\nline 2\nline 3";
  10. extern "C" {
  11. extern unsigned int LineCount(char * StringToCount,
  12.        unsigned int * CharacterCountPtr);
  13. }
  14.  
  15. main()
  16. {
  17.    unsigned int LCount;
  18.    unsigned int CCount;
  19.    LCount = LineCount(TestString, &CCount);
  20.    printf("Lines: %d\nCharacters: %d\n", LCount, CCount);
  21. }
  22.