473,396 Members | 1,915 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to calculate the percentage of each character in a text file?

Plese help. Is there any software by which we can do that?

Feb 1 '07 #1
39 3272
Umesh wrote:
Plese help. Is there any software by which we can do that?
Please restate your real question in the body of your posting. Don't
rely on the text in the Subject to always be obvious.

The question you asked is:

"How to calculate the percentage of each character in a text file?"

Sounds like homework to me. What have you done so far? You are
essentially asking for a distribution of letters (and, perhaps,
punctuation) in a file, possibly in order to print a histogram and/or
report on how often such characters appears in the file.

Start by counting how many of each character you get. Compare that with
the total number of characters you have.

Hint: choose a language and post to that group only. There is some
overlap between C and C++, but they are really different beasts.
Feb 1 '07 #2
I want to find out % of a, b, c, d ..,z in a text file. Suppose that
the text file is a story. Is there any software for this purpose?

Feb 1 '07 #3
In article <11**********************@k78g2000cwa.googlegroups .com>,
Umesh <fr****************@gmail.comwrote:
>I want to find out % of a, b, c, d ..,z in a text file. Suppose that
the text file is a story. Is there any software for this purpose?
Yes, there is software for that purpose, but No, I couldn't name
any immediately.

This sort of program is trivial to write in C (or C++).

A question about your specifications: should upper and lower
case characters be treated as equivilent? Should they be
counted individually? Your specification only mentioned the
lower case letters, so should upper case letters be silently
ignored?

Should the program make some kind of attempt to determine whether
a letter is part of a word, and ignore the ones that are not?
For example, if there is a phrase that "She lives at 36-E 9th St.",
then should the 'E' be counted (36-E is not a word), should
the 't' and 'h' of '9th' be counted, should the 'S' and 't'
of 'St.' be counted?
--
"No one has the right to destroy another person's belief by
demanding empirical evidence." -- Ann Landers
Feb 1 '07 #4
I need at least a solution first. Then I'll look for specifications.

Walter Roberson wrote:
In article <11**********************@k78g2000cwa.googlegroups .com>,
Umesh <fr****************@gmail.comwrote:
I want to find out % of a, b, c, d ..,z in a text file. Suppose that
the text file is a story. Is there any software for this purpose?

Yes, there is software for that purpose, but No, I couldn't name
any immediately.

This sort of program is trivial to write in C (or C++).

A question about your specifications: should upper and lower
case characters be treated as equivilent? Should they be
counted individually? Your specification only mentioned the
lower case letters, so should upper case letters be silently
ignored?

Should the program make some kind of attempt to determine whether
a letter is part of a word, and ignore the ones that are not?
For example, if there is a phrase that "She lives at 36-E 9th St.",
then should the 'E' be counted (36-E is not a word), should
the 't' and 'h' of '9th' be counted, should the 'S' and 't'
of 'St.' be counted?
--
"No one has the right to destroy another person's belief by
demanding empirical evidence." -- Ann Landers
Feb 1 '07 #5
"Umesh" <fr****************@gmail.comwrites:

Please don't top post...
I need at least a solution first. Then I'll look for specifications.
*Snort*

If you don't know the specifications of your solution, how will you
know if you have one?

I think you're in the wrong group. If you're looking for an existing
tool, you need to find a newsgroup for your platform.

----------------------------------------------------------------------
Dave Steffen, Ph.D. Disobey this command!
Software Engineer IV - Douglas Hofstadter
Numerica Corporation
dg@steffen a@t numerica d@ot us (remove @'s to email me)
Feb 1 '07 #6
Umesh wrote:
I need at least a solution first. Then I'll look for specifications.
That would be quite funny if it weren't written by someone who probably
intends to become a programmer. Please do humanity a favor and change
majors.
Feb 1 '07 #7
For simplicity assume that all 26 inputs are in lower case. Now pl
write a program to input a text file and count number of a, b, c, ..,z
in the text file. Put is down in a output file. I'll do the rest.

Dave Steffen wrote:
"Umesh" <fr****************@gmail.comwrites:

Please don't top post...
I need at least a solution first. Then I'll look for specifications.

*Snort*

If you don't know the specifications of your solution, how will you
know if you have one?

I think you're in the wrong group. If you're looking for an existing
tool, you need to find a newsgroup for your platform.

----------------------------------------------------------------------
Dave Steffen, Ph.D. Disobey this command!
Software Engineer IV - Douglas Hofstadter
Numerica Corporation
dg@steffen a@t numerica d@ot us (remove @'s to email me)
Feb 1 '07 #8
"Umesh" <fr****************@gmail.comwrote in
news:11**********************@p10g2000cwp.googlegr oups.com:
For simplicity assume that all 26 inputs are in lower case. Now pl
write a program to input a text file and count number of a, b, c, ..,z
in the text file. Put is down in a output file. I'll do the rest.
How much are you paying?

See the C++ FAQ, section 5.3:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.3
Short answer:

Do it yourself. If you get stuck, ask a specific question.
Feb 1 '07 #9
Umesh wrote:
For simplicity assume that all 26 inputs are in lower case. Now pl
write a program to input a text file and count number of a, b, c, ..,z
in the text file. Put is down in a output file. I'll do the rest.
Didn't you see the words "Please don't top post"?

What rest? Come on, give it a go a post your code. When you do, choose
either C or C++ and post to the appropriate group.
Dave Steffen wrote:
>>"Umesh" <fr****************@gmail.comwrites:

Please don't top post...

>>>I need at least a solution first. Then I'll look for specifications.

*Snort*

If you don't know the specifications of your solution, how will you
know if you have one?

I think you're in the wrong group. If you're looking for an existing
tool, you need to find a newsgroup for your platform.
--
Ian Collins.
Feb 1 '07 #10
In article <11**********************@s48g2000cws.googlegroups .com>,
Umesh <fr****************@gmail.comtop-posted:
>Walter Roberson wrote:
>In article <11**********************@k78g2000cwa.googlegroups .com>,
Umesh <fr****************@gmail.comwrote:
>I want to find out % of a, b, c, d ..,z in a text file. Suppose that
the text file is a story. Is there any software for this purpose?
>A question about your specifications: should upper and lower
>I need at least a solution first. Then I'll look for specifications.
Okay, here's a starting solution that meets all the specifications
you have given so far. It isn't in C or C++, but you have mostly
been asking about "software for this purpose", without appearing
to care much about the programming language.

perl -e 'undef $/; foreach (split(//,<>)) {if (/[a-z]/) {$N{$_}++;$T++}
}; END {foreach (keys(%N)) {print "$_ : $N{$_} ",100 * $N{$_}/$T, "\n"}}'

Sample output:

r : 13 6.04651162790698
a : 15 6.97674418604651
d : 11 5.11627906976744
y : 2 0.930232558139535
u : 6 2.7906976744186
h : 12 5.58139534883721
g : 11 5.11627906976744
f : 12 5.58139534883721
i : 22 10.2325581395349
t : 35 16.2790697674419
e : 20 9.30232558139535
n : 22 10.2325581395349
m : 2 0.930232558139535
v : 1 0.465116279069767
s : 7 3.25581395348837
l : 7 3.25581395348837
p : 3 1.3953488372093
c : 6 2.7906976744186
b : 2 0.930232558139535
z : 1 0.465116279069767
o : 5 2.32558139534884

--
All is vanity. -- Ecclesiastes
Feb 1 '07 #11
Umesh wrote:
I want to find out % of a, b, c, d ..,z in a text file. Suppose that
the text file is a story. Is there any software for this purpose?
By Grabthar's Hammer, will you please quite context (and bottom-post
like the gods intended)...

Yes, there is software to do this. It is a classic awk problem, with
many, many published solutions. Check out "The Unix Programming
Environment" by Kernighan & Pike.

If you want it in C (or C++) then you are going to have to:

- pay for someone to do the work
- do it yourself, perhaps with some help

The first option requires money up front. The second requires that you,
you know, show a little initiative.
Feb 1 '07 #12
Umesh wrote:
For simplicity assume that all 26 inputs are in lower case.

Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or:
<http://www.caliburn.nl/topposting.html>
Feb 1 '07 #13
>>>>"U" == Umesh <fr****************@gmail.comwrites:

UFor simplicity assume that all 26 inputs are in lower case. Now
Upl write a program to input a text file and count number of a,
Ub, c, ..,z in the text file. Put is down in a output file. I'll
Udo the rest.

perl -e 'undef $/; @c = split //, <>; $f{lc $_}++ for @c; print "$_: $f{$_}\n" for ("a".."z");'

Good luck.
(and apologies for line length longer than 80)

Charlton

--
Charlton Wilbur
cw*****@chromatico.net
Feb 1 '07 #14
On Feb 1, 1:27 pm, "Umesh" <fraternitydispo...@gmail.comwrote:
Plese help. Is there any software by which we can do that?

In C++, one of the many ways to do this is:

Create a map where the key is char, and value is int (use std::map)
Create an int variable called "charCount" to keep track of the total
character count

Initialize charCount to zero
Initialize entries for 'a' through 'z' to zero

For each line of the file (use std::ifstream and std::getline)
Convert the line to lowercase
For each character in the line (ignoring ones outside the 'a' to
'z' range)
Increment the map entry by one
Increment charCount by one
End for
End for

Finally, iterate over the map entries, calculate and display
percentages based on the data in the map and charCount.

Regards,
Markus.

Feb 1 '07 #15
On 1 Feb 2007 10:58:15 -0800, in comp.lang.c , "Umesh"
<fr****************@gmail.comwrote:
>I need at least a solution first. Then I'll look for specifications.
I hear this all the time at work, normally from clueless users who
have a deadline to meet and no idea what they're supposed to do. It
seems I'm supposed to be telepathic _and_ prescient, so I can work out
what their boss will want at a future date, code it, and then write
them a spec for their records.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Feb 1 '07 #16

"Walter Roberson" <ro******@ibd.nrc-cnrc.gc.cawrote in message news:eptfr0
>
Okay, here's a starting solution that meets all the specifications
you have given so far. It isn't in C or C++, but you have mostly
been asking about "software for this purpose", without appearing
to care much about the programming language.

perl -e 'undef $/; foreach (split(//,<>)) {if (/[a-z]/) {$N{$_}++;$T++}
}; END {foreach (keys(%N)) {print "$_ : $N{$_} ",100 * $N{$_}/$T, "\n"}}'
That is sort of thing that gets Perl a bad name.

C is a lot less concise, but at least you can read it.

MiniBasic would be better still. Unfortunately there is no way of detecting
end of input.

http://www.personal.leeds.ac.uk/~bgy1mm
Feb 1 '07 #17
Umesh top-posted, and I fixed:
Dave Steffen wrote:
>"Umesh" <fr****************@gmail.comwrites:

Please don't top post...
>>I need at least a solution first. Then I'll look for specifications.
*Snort*

If you don't know the specifications of your solution, how will you
know if you have one?

I think you're in the wrong group. If you're looking for an existing
tool, you need to find a newsgroup for your platform.
For simplicity assume that all 26 inputs are in lower case. Now pl
write a program to input a text file and count number of a, b, c, ..,z
in the text file. Put is down in a output file. I'll do the rest.
Hurry up, Dave! He already said "pl". What more do you need?
Feb 1 '07 #18
Malcolm McLean wrote:
"Walter Roberson" <ro******@ibd.nrc-cnrc.gc.cawrote in message news:eptfr0
>>Okay, here's a starting solution that meets all the specifications
you have given so far. It isn't in C or C++, but you have mostly
been asking about "software for this purpose", without appearing
to care much about the programming language.

perl -e 'undef $/; foreach (split(//,<>)) {if (/[a-z]/) {$N{$_}++;$T++}
}; END {foreach (keys(%N)) {print "$_ : $N{$_} ",100 * $N{$_}/$T, "\n"}}'

That is sort of thing that gets Perl a bad name.
Does it? I thought Perl was intended to be a write only language :)

--
Ian Collins.
Feb 1 '07 #19

"Ian Collins" <ia******@hotmail.comwrote in message
Malcolm McLean wrote:
>"Walter Roberson" <ro******@ibd.nrc-cnrc.gc.cawrote
>>>Okay, here's a starting solution that meets all the specifications
you have given so far. It isn't in C or C++, but you have mostly
been asking about "software for this purpose", without appearing
to care much about the programming language.

perl -e 'undef $/; foreach (split(//,<>)) {if (/[a-z]/) {$N{$_}++;$T++}
}; END {foreach (keys(%N)) {print "$_ : $N{$_} ",100 * $N{$_}/$T, "\n"}}'

That is sort of thing that gets Perl a bad name.
Does it? I thought Perl was intended to be a write only language :)
It might have been deliberately obfuscated, or it might be one of his
workaday scripts. With Perl you cannot tell.
Feb 1 '07 #20
>>>>"MML" == Malcolm McLean <re*******@btinternet.comwrites:

MML"Walter Roberson" <ro******@ibd.nrc-cnrc.gc.cawrote in
MMLmessage news:eptfr0
> Okay, here's a starting solution that meets all the
specifications you have given so far. It isn't in C or C++, but
you have mostly been asking about "software for this purpose",
without appearing to care much about the programming language.

perl -e 'undef $/; foreach (split(//,<>)) {if (/[a-z]/)
{$N{$_}++;$T++} }; END {foreach (keys(%N)) {print "$_ : $N{$_}
",100 * $N{$_}/$T, "\n"}}'
MMLThat is sort of thing that gets Perl a bad name.

MMLC is a lot less concise, but at least you can read it.

Consider the Obfuscated C contest, please, and the fact that both Mr
Roberson's answer and mine were written as one-liners; in my case, I
intentionally aimed for terseness as well, and it looks to me as if Mr
Roberson aimed for the same thing.

C and Perl share the property that they can be as readable or
unreadable as the author desires; the fact that there are many idiot
programmers who can't write one or the other clearly is not a
condemnation of the languages -- or would you rather have us all
writing COBOL?

Charlton
--
Charlton Wilbur
cw*****@chromatico.net
Feb 1 '07 #21
Umesh wrote:
I want to find out % of a, b, c, d ..,z in a text file. Suppose that
the text file is a story. Is there any software for this purpose?
Since this is a trivial exercise given to beginning programming
students, it is not economically sound to offer such software. It would
cost more to produce copies than the market would bear.
Feb 1 '07 #22
Umesh wrote:
>
Plese help. Is there any software by which we can do that?
Yes.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
Feb 2 '07 #23
Umesh wrote:
>
I want to find out % of a, b, c, d ..,z in a text file. Suppose that
the text file is a story. Is there any software for this purpose?
The answer is still 'yes'.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
Feb 2 '07 #24
Umesh wrote:
>
For simplicity assume that all 26 inputs are in lower case. Now pl
write a program to input a text file and count number of a, b, c, ..,z
in the text file. Put is down in a output file. I'll do the rest.
You are top-posting. Don't do that. Read the following links.

--
Some informative links:
<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html>
<http://www.netmeister.org/news/learn2quote.html>
<http://cfaj.freeshell.org/google/ (taming google)
<http://members.fortunecity.com/nnqweb/ (newusers)
Feb 2 '07 #25
Mark P wrote:
Umesh wrote:
>I need at least a solution first. Then I'll look for specifications.

That would be quite funny if it weren't written by someone who probably
intends to become a programmer. Please do humanity a favor and change
majors.
He can take a glass of water and drop in a spoonful of salt. That
will give him a saline solution, which fits his specification
accurately.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>

"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
Feb 2 '07 #26
"Umesh" <fr****************@gmail.comwrites:
I need at least a solution first. Then I'll look for specifications.
Ok, here's a solution:

int main(void) { }

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Feb 2 '07 #27
Umesh wrote:
Plese help. Is there any software by which we can do that?
Nice email address.
Feb 2 '07 #28
Umesh wrote:
For simplicity assume that all 26 inputs are in lower case. Now pl
write a program to input a text file and count number of a, b, c, ..,z
in the text file. Put is down in a output file. I'll do the rest.
We're not here to work for you, clown.
Feb 2 '07 #29
CBFalconer <cb********@yahoo.comwrites:
Umesh wrote:
>>
I want to find out % of a, b, c, d ..,z in a text file. Suppose that
the text file is a story. Is there any software for this purpose?

The answer is still 'yes'.
Then why post it again?
Feb 2 '07 #30
CBFalconer <cb********@yahoo.comwrites:
Umesh wrote:
>>
For simplicity assume that all 26 inputs are in lower case. Now pl
write a program to input a text file and count number of a, b, c, ..,z
in the text file. Put is down in a output file. I'll do the rest.

You are top-posting. Don't do that. Read the following links.
What following links?

If you are going to net nanny people please include the material you
wish them to read properly so that the post is usenet compliant.
Feb 2 '07 #31
Richard said:
CBFalconer <cb********@yahoo.comwrites:
>Umesh wrote:
>>>
For simplicity assume that all 26 inputs are in lower case. Now pl
write a program to input a text file and count number of a, b, c, ..,z
in the text file. Put is down in a output file. I'll do the rest.

You are top-posting. Don't do that. Read the following links.

What following links?
They're in his sig block.
If you are going to net nanny people please include the material you
wish them to read properly so that the post is usenet compliant.
He did. Sig blocks are Usenet compliant.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Feb 2 '07 #32
"Malcolm McLean" <re*******@btinternet.comwrote:
"Walter Roberson" <ro******@ibd.nrc-cnrc.gc.cawrote in message news:eptfr0

Okay, here's a starting solution that meets all the specifications
you have given so far. It isn't in C or C++, but you have mostly
been asking about "software for this purpose", without appearing
to care much about the programming language.

perl -e 'undef $/; foreach (split(//,<>)) {if (/[a-z]/) {$N{$_}++;$T++}
}; END {foreach (keys(%N)) {print "$_ : $N{$_} ",100 * $N{$_}/$T, "\n"}}'
That is sort of thing that gets Perl a bad name.
Oh, no. That's tame compared to some I've seen. At least if you indent
it properly it's halfway readable.
C is a lot less concise, but at least you can read it.
If properly written. If not, not.
MiniBasic would be better still. Unfortunately there is no way of detecting
end of input.
That's one fundamental reason why Mini- or more or less any Basic would
not be better still. If you want to do this kind of small text problem,
use either _well_-written Perl, or a proper specialist language such as
Icon.

Richard
Feb 2 '07 #33
Richard wrote:
CBFalconer <cb********@yahoo.comwrites:
>Umesh wrote:
>>>
I want to find out % of a, b, c, d ..,z in a text file. Suppose that
the text file is a story. Is there any software for this purpose?

The answer is still 'yes'.

Then why post it again?
I suggest you ask Umesh why he asked it again. You might also
consider occasionally posting something of value to someone.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>

"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
Feb 2 '07 #34

"Richard Bos" <rl*@hoekstra-uitgeverij.nlwrote in message
>
>MiniBasic would be better still. Unfortunately there is no way of
detecting
end of input.

That's one fundamental reason why Mini- or more or less any Basic would
not be better still. If you want to do this kind of small text problem,
use either _well_-written Perl, or a proper specialist language such as
Icon.
Not fundamental. Since MinBasic comes as source it would be trival to add an
"ONEOF" construct. The whole point of the language is that the interpreter
is easy to modify, after all.

I didn't put it in as standard simply because microcomputer BASICs generally
don't have it, though it was something I considered.

I've never heard of Icon. There are way too many programming languages
sloshing around that do essentially the same thing but slightly differently.
Eg Fortran and C, or Java and C++.
Perl is one of my least favourites. As a language implementor myself I've
got to say that I admire Larry Wall's technical skill and marketing success.
The core problem is that regular expressions are too complicated for humans
to read, and generally not what is wanted. I want names starting with,
ending with, containing the sequence, of sounding like, not matching 1-5
digits accidentally 0-5 because I misused the * operator.
Feb 3 '07 #35

"Richard Heathfield" <rj*@see.sig.invalidwrote in message
news:Xo******************************@bt.com...
Richard said:
>CBFalconer <cb********@yahoo.comwrites:
>>Umesh wrote:

For simplicity assume that all 26 inputs are in lower case. Now pl
write a program to input a text file and count number of a, b, c, ..,z
in the text file. Put is down in a output file. I'll do the rest.

You are top-posting. Don't do that. Read the following links.

What following links?

They're in his sig block.
>If you are going to net nanny people please include the material you
wish them to read properly so that the post is usenet compliant.

He did. Sig blocks are Usenet compliant.
My answer for this question was so stupid that it amuses. With the
percentage, I thought he meant "modulo," and I wrote a prog that looks at
the chars from a to z, modulo e:
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
char index, mod;
mod = 'e';
for( index = 'a'; index <= 'z'; ++ index)
{
printf( "%c %c %hhd %hhd\n ", index, index % mod, index, index %
mod);
}
system("PAUSE");
return 0;
}
What is the character that makes the beep? LS
Feb 3 '07 #36
Lane Straatman said:

<snip>
What is the character that makes the beep?
'\a' produces an audible or visible alert on a display device.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Feb 3 '07 #37
Lane Straatman wrote:
>
.... snip ...
>
My answer for this question was so stupid that it amuses. With the
percentage, I thought he meant "modulo," and I wrote a prog that
looks at the chars from a to z, modulo e:

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
char index, mod;
mod = 'e';
for( index = 'a'; index <= 'z'; ++ index)
{
printf( "%c %c %hhd %hhd\n ", index, index % mod, index, index %+ mod);
}
system("PAUSE");
return 0;
}
What is the character that makes the beep? LS
On your system:

for (ch = 'a'; ch <= 'z'; ch++)
if ('\a' == (ch % 'e')) putchar(ch);

f'ups set. Crossposts between C and C++ are not productive.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>

"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
Feb 3 '07 #38
In article <qP*********************@bt.com>, re*******@btinternet.com
says...

[ ... ]
I've never heard of Icon. There are way too many programming languages
sloshing around that do essentially the same thing but slightly differently.
Eg Fortran and C, or Java and C++.
Icon most assuredly does not fit that description. It's a descendent
(sort of) of the SNOBOL series of languages. While Icon may not be quite
as different as SNOBOL, it's still definitely not just the same old
thing with a minor variation in syntax.
Perl is one of my least favourites. As a language implementor myself I've
got to say that I admire Larry Wall's technical skill and marketing success.
The core problem is that regular expressions are too complicated for humans
to read, and generally not what is wanted. I want names starting with,
ending with, containing the sequence, of sounding like, not matching 1-5
digits accidentally 0-5 because I misused the * operator.
Like PERL (, AWK, etc.), Icon has pattern matching as a fundamental part
of the language. In PERL, however, the patterns are basically defined
entirely as strings in a rather difficult to read syntax. While it's
open to argument that Icon's syntax could be improved, I'd say it's a
lot more readable than a Regex anyway.

If you care to look at it, the C source code to an (the?) Icon
implementation is available from the University of Arizona. Start from:

http://www.cs.arizona.edu/icon/

--
Later,
Jerry.

The universe is a figment of its own imagination.
Feb 3 '07 #39
"Malcolm McLean" <re*******@btinternet.comwrote:
I've never heard of Icon.
The core problem [with Perl - RLB] is that regular expressions are too
complicated for humans to read, and generally not what is wanted. I want
names starting with, ending with, containing the sequence, of sounding like,
not matching 1-5 digits accidentally 0-5 because I misused the * operator.
Congratulations. You've just described perfectly why Icon is a better
language for you than Perl (and than Basic, BTW, but that speaks for
itself).

Richard
Feb 5 '07 #40

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

44
by: Umesh | last post by:
Plese help. Is there any software by which we can do that?
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.