Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site kitty.UUCP Path: utzoo!watmath!sunybcs!kitty!larry From: larry@kitty.UUCP (Larry Lippman) Newsgroups: net.lang.c Subject: Re: index Message-ID: <169@kitty.UUCP> Date: Sun, 28-Jul-85 18:59:01 EDT Article-I.D.: kitty.169 Posted: Sun Jul 28 18:59:01 1985 Date-Received: Mon, 29-Jul-85 07:27:51 EDT References: <652@hou2e.UUCP> Organization: Recognition Research Corp., Clarence, NY Lines: 29 > What is the BSD function "index" supposed to do? Does anyone > know the equivalent on a System V Release 2 machine? I have System V Release 2.2 on 3B2's and have used the index(3F) function in Fortran applications. The function is called from a Fortran program and returns the location (i.e., integer character count) of the substring in the character string . It works like this: integer i character*len1 cs1 character*len2 cs2 i=index(cs1,cs2) Index is similar to the C language function 'strspn'. I am not a BSD person, so I can't tell you if BSD does anything different from the above. Larry Lippman Recognition Research Corp. Clarence, New York UUCP {decvax,dual,rocksanne,rocksvax,watmath}!sunybcs!kitty!larry {rice,shell}!baylor!kitty!larry syr!buf!kitty!larry VOICE 716/741-9185 TELEX {via WUI} 69-71461 answerback: ELGECOMCLR "Have you hugged your cat today?"