home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 6.ddi / TASMEXMP.ZIP / CALLCT.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  635 b   |  24 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. #include <stdio.h>
  10.  
  11. char * TestString="Line 1\nline 2\nline 3";
  12. extern "C" {
  13. extern unsigned int LineCount(char * StringToCount,
  14.        unsigned int * CharacterCountPtr);
  15. }
  16.  
  17. main()
  18. {
  19.    unsigned int LCount;
  20.    unsigned int CCount;
  21.    LCount = LineCount(TestString, &CCount);
  22.    printf("Lines: %d\nCharacters: %d\n", LCount, CCount);
  23. }
  24.