[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


MATCHDELIM Source code in matchdelim.pro

MATCHDELIM

Name
       MATCHDELIM
Purpose
        Match open/close delimiters in a string.
Category
        text/strings
Calling Sequence
        position = matchdelim( strn, [openpos])
Input Parameters
        strn        -- a string containing an open                 in
                       delimiter (e.g. '{') in which you
                       want to find the matching closing
                       delimiter (e.g. '}')
Keyword Parameters
        OPEN_DELIM  -- A single character containing the opening   in
                       delimiter (e.g. '(').  Default is '{'
        CLOSE_DELIM -- A single character containing the closing   in
                       delimiter (e.g. ')').  Default is '}'
Output Parameters
        position -- returns the position in strn of the            out
                    closing delimiter, -1 if no closing found.
        openpos  -- Set to a named variable to receive the         out
                    position of the first opening delimiter.
                    Optional.
Common Blocks

Side Effects

Note
        - Any pair of (nonidentical) characters can be used as
          delimiters.
Example
        matchdelim('{one{two}}three') returns 9, the character just
        before 'three'.
Revision History
       $Id: matchdelim.pro,v 1.3 1996/06/14 20:00:27 mcraig Exp $
       $Log: matchdelim.pro,v $
       Revision 1.3  1996/06/14 20:00:27  mcraig
       Updated Copyright info.
       Revision 1.2  1996/05/09 00:22:17  mcraig
       Removed restriction that open delim must be first char.  Added argument
       to allow for return of position of open delim.
       Revision 1.1  1996/01/31 18:41:06  mcraig
       Initial revision
Release
       $Name: Rel_2_1_2 $
Copyright
  Copyright (C) 1996 The Regents of the University of California, All
  Rights Reserved.  Written by Matthew W. Craig.
  See the file COPYRIGHT for restrictions on distrubting this code.
  This code comes with absolutely NO warranty; see DISCLAIMER for details.

Last modified by pro2html on 2004 June 29 at 21:24 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically