Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Thanks Alex, that works great!

Author: Alex Boby

Date: 18:48:43 08/23/99

Go up one level in this thread


On August 23, 1999 at 18:21:22, Pete Galati wrote:

>On August 23, 1999 at 16:36:20, Alex Boby wrote:
>
>>On August 23, 1999 at 15:01:21, Pete Galati wrote:
>>
>>>Thanks Alex,
>>>
>>>I saved that off to my 'util' directory and compiled it there so that I'd have
>>>future use of it (some things get uncerimoniously deltree'd, some don't). It
>>>works great, exceptionally easy to use. Very cool little utility. Thanksyou.
>>>
>>>Pete
>>
>>   You may have noticed that if you put in bad filenames, the program crashes.
>>You can fix this by adding a couple lines after the fp=fopen()... line:
>>
>>if (fp==NULL)
>>  {printf("Bad Filename.\n"); exit(0);}
>>
>>  just add this in if it concerns you.
>
>Just a couple of minutes ago I tried to get a count and it said that it counted
>2 !'s but that might have been from using a wrong file name (I'm a 2 finger
>typist, it was trying to tell me that) when I knew I had in the area of 200.
>
>So I took a look at the opn file for some editing errors but coudn't find any.
>so I tried again and it told me 198 !'s the second time. So I figured I had just
>entered it wrong.
>
>Did you write that? Very cool. It's rather specific as to what it does, but it
>does the job well. It could also easily be modified to count the number of games
>in a pgn file by counting 'Result'. It could probably also be used for all sorts
>of other counting uses. I think I might be able to edit it so that you could
>input a string to count like "excount [string] [filename]"
>
>Thanks Alex, works like a charm.
>
>Pete

   Yep, I actually just read your post and wrote it in about 4 minutes. You
would have to change it around if you wanted to compare whole strings because as
it is it only reads in one character at a time. You could easily change it to
search for other characters though!!



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.