View Raw SPL
/*****************************************************************************
*                                                                            *
*   ISUNIT.SPL    Copyright (C) 1999 DSP Development Corporation             *
*                               All Rights Reserved                          *
*                                                                            *
*   Author:       Randy Race                                                 *
*                                                                            *
*   Synopsis:     Determines if a string is a recognized unit                *
*                                                                            *
*   Revisions:    11 Nov 1999  RRR  Creation                                 *
*                                                                            *
*****************************************************************************/


#if @HELP_ISUNIT

    ISUNIT

    Purpose: Returns 1 if string is a recognized engineering unit, else 0

    Syntax:  ISUNIT(str)

              str - a string

    Returns: an integer, 1 if str is a unit, else 0

    Example:
             a = isunit("Volts")
             b = isunit("xxx")

             a == 1
             b == 0

    Remarks:
             The recognizable unit list can change if units were defined
             with the SETHUNITS, SETVUNITS or SETZUNITS function.

    See Also:
             Sethunits
             Setvunits
             Setzunits

#endif

/* built-in */