home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM A / PD-ROM A.iso / Education / Math / LOC(Metric) / Pstrcmp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-09-09  |  1.0 KB  |  29 lines  |  [TEXT/KAHL]

  1. /************************************************************************/
  2. /* Name:  PStrCmp Module Implementation                                    */
  3. /*                                                                        */
  4. /* Purpose:  Return TRUE if two Pascal strings are identical             */
  5. /*     (case sensitive), or FALSE otherwise.                            */
  6. /*                                                                        */
  7. /* Author:  Steve Nies                                                    */
  8. /*                                                                        */
  9. /* Date created: 28 April 89                                            */
  10. /*                                                                        */
  11. /* Disclaimer:  This software has been developed privately by the        */
  12. /*     Author and has been released into the Public Domain.  The        */
  13. /*     author makes no claims as to the correctness or suitability        */
  14. /*     of the software for the intended purpose.                        */
  15. /************************************************************************/
  16.  
  17. #include <Style.h>
  18.  
  19. Boolean PStrCmp ( register address target, register address source )
  20.  
  21. BEGIN
  22.   register string src = (string) source;
  23.   register string trgt = (string) target;
  24.   register int length = *src + 1;
  25.   WHILE length-- LOOP
  26.     if (*trgt++ != *src++) return FALSE;
  27.   END_LOOP;
  28.   return TRUE;
  29. END