🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #46652

Re: Free reliable wordcount utility available (final version)

#46652
From: Thomas J. Boschloo
Date: Fri, 08 Nov 2002 13:48
52 lines
3813 bytes
Benjamin Goldberg wrote:
> 
> Thomas J. Boschloo wrote:
> >
> > Benjamin Goldberg wrote:

> > > extern void func( int * x );
> > > #define FUNC() (int)({ int t; func(&t); t; })
> > >
> > > ....
> > >    int z = FUNC();
> > >    other_function( FUNC() );
> >
> > This looks flawed to me, but probably you are doing something clever.
> > What is 't'? Some variable? You can't define variables at any position
> > you like in ANSI-C AFAIK, that is C++.
> 
> You can declare variables at the beginning of a block.  Note the ({})
> construct has a pair of {} in it?  So what you've got, is a block with a
> pair of parenthesis around it, and a cast in front of those parens.

I still think it is dangerous, even if it is allowed in ANSI-C. E.g.
what if the procedure you use FUNC() in already uses a variable 't'? You
will get a compiler warning of course, but then again, you might not.

> In other words, gcc allows you to use a block in a place where you would
> normally only be allowed an expression.  Vaguely like 'do BLOCK' in the
> perl programming language.

I do not know how to program in Perl. I have always understood that it
is mainly useful for scripts on www-servers, and I don't have to
priviledge to run them on the page where I host my homepage.

> Better to say, maintainable code is often more important than efficient
> code -- and comments are merely one part of making your code
> maintainable.

I hope the current version of my code doesn't need to be maintained ;-)
I hope it is finished now. I am still not sure about the leet-code
though, I only use leet code for letters like 'aeoiu'. It is not my
point to make my posts unreadable if I should post in leet-code.

I just ran that version of my wordcnt utility on my 100mb swapfile from
MS-Dos. If finished well within a full hour :-) That is a lot less then
I expected at first. I ran out of memory though.. 300000 words counted I
believe, lot's of MICROSOFT strings in my swapfile ;-P

Thomas
-- 
There are two types of people with Borderline disorder. The ones I like
and the ones I don't like.   - T.J. Boschloo
<home.hccnet.nl/t.j.boschloo>
Technical Details
Message-ID: <3DCBC0A8.F3785708@hccnet.nl.invalid>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.security.pgp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!newsfeed.online.be!bnewspeer00.bru.ops.eu.uu.net!emea.uu.net!news.hccnet.nl!not-for-mail
References: <3DC1596C.6D2B55BD@hccnet.nl.invalid> <3DC526FC.CBCFE9B6@hccnet.nl.invalid> <3DC5451F.DBF3CDDA@eton.powernet.co.uk> <pan.2002.11.03.17.05.02.482162@yahoo.co.uk> <3DC81975.45915377@hccnet.nl.invalid> <3DC85EA2.2C8E26DA@earthlink.net> <3DC95533.512AB0A3@hccnet.nl.invalid> <3DC976DA.32815A18@earthlink.net>

Show Full Headers
Complete Article Headers
Message-ID: <3DCBC0A8.F3785708@hccnet.nl.invalid>
Subject: Re: Free reliable wordcount utility available (final version)
Date: Fri, 08 Nov 2002 14:48:24 +0100
From: "Thomas J. Boschloo" <nospam@hccnet.nl.invalid>
References: <3DC1596C.6D2B55BD@hccnet.nl.invalid> <3DC526FC.CBCFE9B6@hccnet.nl.invalid> <3DC5451F.DBF3CDDA@eton.powernet.co.uk> <pan.2002.11.03.17.05.02.482162@yahoo.co.uk> <3DC81975.45915377@hccnet.nl.invalid> <3DC85EA2.2C8E26DA@earthlink.net> <3DC95533.512AB0A3@hccnet.nl.invalid> <3DC976DA.32815A18@earthlink.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.security.pgp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!newsfeed.online.be!bnewspeer00.bru.ops.eu.uu.net!emea.uu.net!news.hccnet.nl!not-for-mail
Newsgroups: alt.privacy.anon-server,sci.crypt,alt.fan.cult-dead-cow,alt.security.pgp
Organization: Hobby Computer Club News Network
Lines: 54
NNTP-Posting-Host: uds15-35.dial.hccnet.nl
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.hccnet.nl 1036766006 20068 62.251.35.15 (8 Nov 2002 14:33:26 GMT)
X-Complaints-To: abuse@hccnet.nl
NNTP-Posting-Date: Fri, 8 Nov 2002 14:33:26 +0000 (UTC)
Cancel-Lock: sha1:YoFXDjz9IvvrLaZatfDK5dnHRLk=
X-Mailer: Mozilla 4.8 [en] (Win98; U)
X-Accept-Language: en,nl,de
X-NFilter: 1.2.1-b1