Is Unicode character a vowel?

Is there a simple way to determine if a character in whatever codepage 
is a vowel?
0
srice1 (41)
5/3/2007 7:10:00 PM
vc.mfc 33608 articles. 0 followers. Follow

62 Replies
1160 Views

Similar Articles

[PageSpeed] 23

"Susan Rice" <srice1@cox.net> wrote in message 
news:NAp_h.291586$7g3.105116@newsfe14.phx...

> Is there a simple way to determine if a character in whatever codepage is 
> a vowel?

I suspect that you'd have to define 'vowel' (in an internationally 
acceptable way) before this question made any sense.   Even then, how do you 
assign a description to letters which can be either?  In Welsh w is a vowel. 
In English y can be either a vowel or a consonant.   Which is the consonant 
in the French word "Oui"?    If there is none, is there a consonant in the 
English word "We"?   These things are sent to try us!

Dave
-- 
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm

0
dave9996 (486)
5/3/2007 6:39:21 PM
"David Webber" <dave@musical-dot-demon-dot-co.uk> wrote in message
news:OOrqtJbjHHA.3512@TK2MSFTNGP06.phx.gbl...
>
> "Susan Rice" <srice1@cox.net> wrote in message
> news:NAp_h.291586$7g3.105116@newsfe14.phx...
>
> > Is there a simple way to determine if a character in whatever codepage
is
> > a vowel?
>
> I suspect that you'd have to define 'vowel' (in an internationally
> acceptable way) before this question made any sense.   Even then, how do
you
> assign a description to letters which can be either?  In Welsh w is a
vowel.
> In English y can be either a vowel or a consonant.   Which is the
consonant
> in the French word "Oui"?    If there is none, is there a consonant in the
> English word "We"?   These things are sent to try us!
>
> Dave
> -- 
> David Webber
> Author of 'Mozart the Music Processor'
> http://www.mozart.co.uk
> For discussion/support see
> http://www.mozart.co.uk/mzusers/mailinglist.htm
>

Which of the y's in the english word "syzygy" are the vowels and which are
the consonants?


0
5/3/2007 7:45:35 PM
I'm not aware of such an algorithm, because different languages have different
representations of vowels; in some languages they are implied, and vowel marks are
optional.  Even in English, vowels as such as ambiguous (is "y" a vowel?) and various
dipthongs which are vowel-like have problems in that 'various' has four physical vowels
and three logical vowels.  It is nontrivial in English and beyond that I think the general
solution is impossible.
					joe
 
On Thu, 03 May 2007 11:10:00 -0800, Susan Rice <srice1@cox.net> wrote:

>Is there a simple way to determine if a character in whatever codepage 
>is a vowel?
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
5/3/2007 8:11:57 PM
Hi Susan,

Looks like the concensus is that there is nothing built in to do this, 
however if you know what languages you want to deal with you could just set 
up tables and do a character lookup at run time.

Tom

"Susan Rice" <srice1@cox.net> wrote in message 
news:NAp_h.291586$7g3.105116@newsfe14.phx...
> Is there a simple way to determine if a character in whatever codepage is 
> a vowel? 

0
tom.nospam (3240)
5/3/2007 8:25:23 PM
On Thu, 3 May 2007 13:25:23 -0700, "Tom Serface"
<tom.nospam@camaswood.com> wrote:

>Looks like the concensus is that there is nothing built in to do this, 
>however if you know what languages you want to deal with you could just set 
>up tables and do a character lookup at run time.

I can just say that, in Italian language, the concept of wovel is well
defined: there are just 5 wovels: 'a', 'e', 'i', 'o', 'u'. So the word
"pizza" contains 2 wovels ('i' and 'a'), the word "spaghetti" has 3
wovels ('a', 'e', 'i'), and so on.

So, basically, the look-up algorithm is fine for the Italian language.

It's something like this (just using standard ANSI chars)

 bool IsItalianWovel( char ch )
 {
   int c = toupper(ch);
   switch( c )
   {
     case 'a':
     case 'e':
     case 'i':
     case 'o':
     case 'u':
       return true;

     default:
       return false;
   }
 }


But, as others said, in languages like English (and I also suppose in
languages from the Far East), the concept of wovels may be more
ambiguous.

MrAsm
0
mrasm (715)
5/4/2007 8:54:13 AM
"MrAsm" <mrasm@usa.com> wrote in message 
news:55sl33dvk41chh0gprho9vg4erghce7iul@4ax.com...

> I can just say that, in Italian language, the concept of wovel is well
> defined: there are just 5 wovels: 'a', 'e', 'i', 'o', 'u'. So the word
> "pizza" contains 2 wovels ('i' and 'a'), the word "spaghetti" has 3
> wovels ('a', 'e', 'i'), and so on.
>
> So, basically, the look-up algorithm is fine for the Italian language.
>
> It's something like this (just using standard ANSI chars)
>...

Italian would also need accented characters of course - eg  "pi�"  if I 
remember right (and if the newsgroup accepts the accented u).

> But, as others said, in languages like English (and I also suppose in
> languages from the Far East), the concept of wovels may be more
> ambiguous.

Obviously in languages where a glyph represents a whole syllable, you cannot 
classify symbols into vowels and consonants - so that's most of the unicode 
code points out for a start :-)

Quite generally the concept of a "vowel" is related to sounds rather than 
letters.   And languages which do not represent sounds phonetically give you 
almost no chance to say that "a letter is a vowel".  (Very few languages are 
as phonetic as Italian is, and most have a more complex array of vowel 
sounds.)   Even those that do use groups of ltters to represent a single 
vowel sound like "igh" (eg in "right") in English and "on" (eg in "bon") in 
French, and most allow you to use letters which usually represent vowels as 
consonents.  (What about the first "i" in the Italian word "ieri"????)

The question needs to be asked - why does on wish to distinguish a vowel 
from other letters?   There may be a way of doing it which satisfies a 
particular purpose, or there may not be.   But it will depend on the 
purpose.

Dave
-- 
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm

P.S.  It's a popular joke that Welsh, with words like gwr (=man), dwr 
(=water), gwn (=gown),  ffwl=(fool),  (all, IIRC, with a ^ on the w) has no 
vowels.  But of course it has - it's just that it has different spelling 
conventions and w and y are both usually vowels.  [w is pronounced more or 
less as the English "oo" either as in pool or as in book according to 
context.]






0
dave9996 (486)
5/4/2007 10:38:29 AM
You're right.  OP would need to decide on some axioms (like is 'y' a vowel 
or not).  English is a difficult language.  For example, we have a rule that 
you should put 'i' after 'e', except after 'c' except in words that where it 
sounds like a 'a' like in 'neighbor' or 'weigh'.  Then the most intelligent 
guy ever here "Einstein" got it wrong twice in his own name.

All that said, OP could establish axioms for each language.  For example, 
'y' could be a vowel and it usually is when it's the only 'vowel' in a 
syllable or when it is used as a vowel.  It's an ambiguous rule, but one 
that could be programmed.  The word would have to be evaluated a little more 
closely than Italian :o)

Tom

"MrAsm" <mrasm@usa.com> wrote in message 
news:55sl33dvk41chh0gprho9vg4erghce7iul@4ax.com...

> I can just say that, in Italian language, the concept of wovel is well
> defined: there are just 5 wovels: 'a', 'e', 'i', 'o', 'u'. So the word
> "pizza" contains 2 wovels ('i' and 'a'), the word "spaghetti" has 3
> wovels ('a', 'e', 'i'), and so on.
>
> So, basically, the look-up algorithm is fine for the Italian language.
>
> It's something like this (just using standard ANSI chars)
>
> bool IsItalianWovel( char ch )
> {
>   int c = toupper(ch);
>   switch( c )
>   {
>     case 'a':
>     case 'e':
>     case 'i':
>     case 'o':
>     case 'u':
>       return true;
>
>     default:
>       return false;
>   }
> }
>
>
> But, as others said, in languages like English (and I also suppose in
> languages from the Far East), the concept of wovels may be more
> ambiguous.
>
> MrAsm 

0
tom.nospam (3240)
5/4/2007 1:23:19 PM
Perhaps OP is trying to break words into syllables or something other 
section based on vowels.  I think this would be a semantical challenge, but 
not impossible.  I am glad I don't have the task.  I have a difficult enough 
time with English :o)

Perhaps you remember these old jokes:

http://www.geocities.com/CollegePark/6174/vowels.htm
http://www.henriettesherbal.com/articles/vowels.html

Tom

"David Webber" <dave@musical-dot-demon-dot-co.uk> wrote in message 
news:%23C%232HujjHHA.2120@TK2MSFTNGP03.phx.gbl...

 > The question needs to be asked - why does on wish to distinguish a vowel
> from other letters?   There may be a way of doing it which satisfies a 
> particular purpose, or there may not be.   But it will depend on the 
> purpose.
>
> Dave
> -- 
> David Webber
> Author of 'Mozart the Music Processor'
> http://www.mozart.co.uk
> For discussion/support see
> http://www.mozart.co.uk/mzusers/mailinglist.htm
>
> P.S.  It's a popular joke that Welsh, with words like gwr (=man), dwr 
> (=water), gwn (=gown),  ffwl=(fool),  (all, IIRC, with a ^ on the w) has 
> no vowels.  But of course it has - it's just that it has different 
> spelling conventions and w and y are both usually vowels.  [w is 
> pronounced more or less as the English "oo" either as in pool or as in 
> book according to context.]
>
>
>
>
>
> 

0
tom.nospam (3240)
5/4/2007 1:27:50 PM
The way we do something similar is to first transliterate the string to 
"Latin" and then check with the more limited set of vowels in Latin.

The ICU "Any to Latin" transliterator does a good job with many ranges of 
Unicode (and promises to do better as time goes on). e.g.

Transliterator name	Example in original writing system	Latin Transliteration
Devanagari to Latin	बाढ़ के बाद सारा संसार एक ही भाषा बोलता था।	bāṛha kē 
bāda sārā sansāra ēka hī bhāṣā bōlatā thā.
Bengali to Latin	আমি কাঁচ খেতে পারি, তাতে আমার কোনো ক্ষতি হয় না।	āmi kām̐ca 
khētē pāri, tātē āmāra kōnō kṣati haẏa nā.
Gujarati to Latin	ગુજરાતી	gujarātī
Gurmukhi to Latin	ਧਰਮਸ਼ਾਲਾ	dharamaśālā
Kannada to Latin	ಇಡೀ ಪ್ರಪಂಚದ ಜನರು ಒಂದೇ ಭಾಷೆಯನ್ನು ಮಾತಾಡುತ್ತಿ ದ್ದರು	iḍī 
prapan̄cada janaru ondē bhāṣeyannu mātāḍutti ddaru
Malayalam to Latin	ഭൂമിയില് ഒക്കെയും ഒരേ ഭാഷയും ഒരേ വാക്കും ആയിരുന്നുbhūmiyilokkeyuṁ orē bhāṣayuṁ orē vākkuṁ āyirunnu
Oriya to Latin	ଓଡ଼ିଆ	ōṛi'ā
Tamil to Latin	வெள்ளப் பெருக்குக்குப் பிறகு முழு உலகமும் ஒரே மொழியைப் 
பேசியது	veḷḷap perukkukkup piṟaku muḻu ulakamum orē moḻiyaip pēciyatu
Telegu to Latin	తెలుగు	telugu
Arabic to Latin	وَكَانَ أَهْلُ الأَرْضِ جَمِيعاً يَتَكَلَّمُونَ أَوَّلاً 
بِلِسَانٍ وَاحِدٍ وَلُغَةٍ وَاحِدَةٍ	wakāna ạảh̊lu ạlạảr̊ḍi jamīʿạaⁿ 
yatakalãmūna ạảwãlạaⁿ bilisāniⁿ wāḥidiⁿ walugẖaẗiⁿ wāḥidaẗiⁿ
Cyrillic to Latin	В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!	V 
čaŝah ûga žil by citrus? Da, no falʹšivyj ékzemplâr!
Greek to Latin	Δεν ξέρω, εγώ απλά δουλεύω εδώ	Den xérō, egṓ aplá douleúō edṓ
Han to Latin	那時,天下人的口音言語,都是一樣。	nà shí, tiān xià rén de kǒu yīn yán yǔ, dōu 
shì yī yàng.
Hangul to Latin	온 땅의 구음이 하나이요 언어가 하나이었더라	on ddang'yi gueum'i hanaiyo 
eon'eoga hanaieossdeora
Hebrew to Latin	?דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה	?dg sqrn 
şt bym mʼwkzb wlpţʻ mẕʼ lw ẖbrh ʼyk hqlyth
Hiragana to Latin	いろはにほへとちりぬるを わかよたれそつねならむ うゐのおくやまけふこえて あさきゆめみしゑひもせすirohanihohetochirinuruwowakayotaresotsunenaramu uwinookuyamakefukoete asakiyumemishiwehimosesu
Katakana to Latin	イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスンirohanihohetochirinuruwo wakayotareso tsunenaramu uwinookuyama kefukoete asakiyumemishi 
wehimosesun
Jamo to Latin	모음	mo'eum

Of course, once you've transliterated it, you lose the correspondence 
between the original letters and their transliterated results.

But... for what it's worth...

Bob



"Tom Serface" <tom.nospam@camaswood.com> wrote in message 
news:18D2F1DC-D397-4868-985F-4C3D2235601B@microsoft.com...
> Hi Susan,
>
> Looks like the concensus is that there is nothing built in to do this, 
> however if you know what languages you want to deal with you could just 
> set up tables and do a character lookup at run time.
>
> Tom
>
> "Susan Rice" <srice1@cox.net> wrote in message 
> news:NAp_h.291586$7g3.105116@newsfe14.phx...
>> Is there a simple way to determine if a character in whatever codepage is 
>> a vowel?
> 
0
5/4/2007 5:23:34 PM
Yikes, this is getting more difficult all the time.  I still think everyone 
should just use English.  Then we wouldn't have all these translations 
issues.

:o)

Tom

"Bob Eaton" <pete_dembrowski@hotmail.com> wrote in message 
news:008DB6A1-232B-4A8A-B213-C49DF0FD65D6@microsoft.com...
> The way we do something similar is to first transliterate the string to 
> "Latin" and then check with the more limited set of vowels in Latin.
>
> The ICU "Any to Latin" transliterator does a good job with many ranges of 
> Unicode (and promises to do better as time goes on). e.g.
>
> Transliterator name Example in original writing system Latin 
> Transliteration
> Devanagari to Latin बाढ़ के बाद सारा संसार एक ही भाषा बोलता था। bāṛha kē 
> bāda sārā sansāra ēka hī bhāṣā bōlatā thā.
> Bengali to Latin আমি কাঁচ খেতে পারি, তাতে আমার কোনো ক্ষতি হয় না। āmi 
> kām̐ca khētē pāri, tātē āmāra kōnō kṣati haẏa nā.
> Gujarati to Latin ગુજરાતી gujarātī
> Gurmukhi to Latin ਧਰਮਸ਼ਾਲਾ dharamaśālā
> Kannada to Latin ಇಡೀ ಪ್ರಪಂಚದ ಜನರು ಒಂದೇ ಭಾಷೆಯನ್ನು ಮಾತಾಡುತ್ತಿ ದ್ದರು iḍī 
> prapan̄cada janaru ondē bhāṣeyannu mātāḍutti ddaru
> Malayalam to Latin ഭൂമിയില് ഒക്കെയും ഒരേ ഭാഷയും ഒരേ വാക്കും 
> ആയിരുന്നുbhūmiyilokkeyuṁ orē bhāṣayuṁ orē vākkuṁ āyirunnu
> Oriya to Latin ଓଡ଼ିଆ ōṛi'ā
> Tamil to Latin வெள்ளப் பெருக்குக்குப் பிறகு முழு உலகமும் ஒரே மொழியைப் 
> பேசியது veḷḷap perukkukkup piṟaku muḻu ulakamum orē moḻiyaip pēciyatu
> Telegu to Latin తెలుగు telugu
> Arabic to Latin وَكَانَ أَهْلُ الأَرْضِ جَمِيعاً يَتَكَلَّمُونَ أَوَّلاً 
> بِلِسَانٍ وَاحِدٍ وَلُغَةٍ وَاحِدَةٍ wakāna ạảh̊lu ạlạảr̊ḍi jamīʿạaⁿ 
> yatakalãmūna ạảwãlạaⁿ bilisāniⁿ wāḥidiⁿ walugẖaẗiⁿ wāḥidaẗiⁿ
> Cyrillic to Latin В чащах юга жил бы цитрус? Да, но фальшивый экземпляр! V 
> čaŝah ûga žil by citrus? Da, no falʹšivyj ékzemplâr!
> Greek to Latin Δεν ξέρω, εγώ απλά δουλεύω εδώ Den xérō, egṓ aplá douleúō 
> edṓ
> Han to Latin 那時,天下人的口音言語,都是一樣。 nà shí, tiān xià rén de kǒu yīn yán yǔ, dōu 
> shì yī yàng.
> Hangul to Latin 온 땅의 구음이 하나이요 언어가 하나이었더라 on ddang'yi gueum'i hanaiyo 
> eon'eoga hanaieossdeora
> Hebrew to Latin ?דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה ?dg 
> sqrn şt bym mʼwkzb wlpţʻ mẕʼ lw ẖbrh ʼyk hqlyth
> Hiragana to Latin いろはにほへとちりぬるを わかよたれそつねならむ うゐのおくやまけふこえて 
> あさきゆめみしゑひもせすirohanihohetochirinuruwowakayotaresotsunenaramu 
> uwinookuyamakefukoete asakiyumemishiwehimosesu
> Katakana to Latin イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム ウヰノオクヤマ ケフコエテ アサキユメミシ 
> ヱヒモセスンirohanihohetochirinuruwo wakayotareso tsunenaramu uwinookuyama 
> kefukoete asakiyumemishi wehimosesun
> Jamo to Latin 모음 mo'eum
>
> Of course, once you've transliterated it, you lose the correspondence 
> between the original letters and their transliterated results.
>
> But... for what it's worth...
>
> Bob
>
>
>
> "Tom Serface" <tom.nospam@camaswood.com> wrote in message 
> news:18D2F1DC-D397-4868-985F-4C3D2235601B@microsoft.com...
>> Hi Susan,
>>
>> Looks like the concensus is that there is nothing built in to do this, 
>> however if you know what languages you want to deal with you could just 
>> set up tables and do a character lookup at run time.
>>
>> Tom
>>
>> "Susan Rice" <srice1@cox.net> wrote in message 
>> news:NAp_h.291586$7g3.105116@newsfe14.phx...
>>> Is there a simple way to determine if a character in whatever codepage 
>>> is a vowel?
>> 

0
tom.nospam (3240)
5/4/2007 5:40:20 PM
"Tom Serface" <tom.nospam@camaswood.com> wrote in message 
news:964ABC7F-5F7A-4E99-B1FA-51244E2F2196@microsoft.com...

> Yikes, this is getting more difficult all the time.  I still think 
> everyone should just use English.  Then we wouldn't have all these 
> translations issues.

And you can define which of the (less than) 256 entries in the Western code 
page are vowels according to taste and forget the others :-)

Dave
-- 
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm

0
dave9996 (486)
5/4/2007 8:18:57 PM
Yes... but then I'd be out of a job :-)

or

But that's why I get paid the big bucks :-)

Bob

"Tom Serface" <tom.nospam@camaswood.com> wrote in message 
news:964ABC7F-5F7A-4E99-B1FA-51244E2F2196@microsoft.com...
> Yikes, this is getting more difficult all the time.  I still think 
> everyone should just use English.  Then we wouldn't have all these 
> translations issues.
>
> :o)
>
> Tom


0
5/5/2007 1:30:06 AM
> Is there a simple way to determine if a character in whatever codepage 
> is a vowel?

As you could probably notice from the posts, the problem as posted does not 
really have a solution.
Can you explain a bit what are you really trying to solve?


-- 
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
0
5/5/2007 8:01:04 AM
I remember it as "i before e except after c, with a few wierd exceptions"

Hyphenation is very complex; for example, the rules for German hyphenation (the only other
language I was once competent in, many years ago) are not at all like the rules for
English hyphenation.  Also, dipthongs complicate rules; as in English, combinations of
vowels can be inseparable.  There is no general rule for hyphenation that applies to all
languages, and tyring to invent ad-hoc hyphenators based on simplistic rules is a Really
Bad Idea.  There are some good works on hyphenation techniques out there, if this were the
problem domain (which we don't actually know).  

My recollection is that Hebrew has no vowels at all, although it has vowel marks, but it
has been decades since I had anyone who knew the language explain it to me, so my memory
is fuzzy.  

However, since it is already hard in English, I find the likelihood that there is a
single, universal rule that can apply to all languages somewhat problematic.  Some
languages (as pointed out, Italian) may have simple rules, but other languages might have
rules that make English look trivial.
					joe

On Fri, 4 May 2007 06:23:19 -0700, "Tom Serface" <tom.nospam@camaswood.com> wrote:

>You're right.  OP would need to decide on some axioms (like is 'y' a vowel 
>or not).  English is a difficult language.  For example, we have a rule that 
>you should put 'i' after 'e', except after 'c' except in words that where it 
>sounds like a 'a' like in 'neighbor' or 'weigh'.  Then the most intelligent 
>guy ever here "Einstein" got it wrong twice in his own name.
>
>All that said, OP could establish axioms for each language.  For example, 
>'y' could be a vowel and it usually is when it's the only 'vowel' in a 
>syllable or when it is used as a vowel.  It's an ambiguous rule, but one 
>that could be programmed.  The word would have to be evaluated a little more 
>closely than Italian :o)
>
>Tom
>
>"MrAsm" <mrasm@usa.com> wrote in message 
>news:55sl33dvk41chh0gprho9vg4erghce7iul@4ax.com...
>
>> I can just say that, in Italian language, the concept of wovel is well
>> defined: there are just 5 wovels: 'a', 'e', 'i', 'o', 'u'. So the word
>> "pizza" contains 2 wovels ('i' and 'a'), the word "spaghetti" has 3
>> wovels ('a', 'e', 'i'), and so on.
>>
>> So, basically, the look-up algorithm is fine for the Italian language.
>>
>> It's something like this (just using standard ANSI chars)
>>
>> bool IsItalianWovel( char ch )
>> {
>>   int c = toupper(ch);
>>   switch( c )
>>   {
>>     case 'a':
>>     case 'e':
>>     case 'i':
>>     case 'o':
>>     case 'u':
>>       return true;
>>
>>     default:
>>       return false;
>>   }
>> }
>>
>>
>> But, as others said, in languages like English (and I also suppose in
>> languages from the Far East), the concept of wovels may be more
>> ambiguous.
>>
>> MrAsm 
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
5/5/2007 3:32:36 PM
Word 2007 does an awful job of hyphenation (or perhaps it is wordwarp - pun 
intended) especially when used with Outlook.  I find words being word 
wrapped (even without hyphenation) in the weirdest places.

Tom

"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:pf8p33l9i90j0el8usb1fst52ekfaan3hm@4ax.com...
>I remember it as "i before e except after c, with a few wierd exceptions"
>
> Hyphenation is very complex; for example, the rules for German hyphenation 
> (the only other
> language I was once competent in, many years ago) are not at all like the 
> rules for
> English hyphenation.  Also, dipthongs complicate rules; as in English, 
> combinations of
> vowels can be inseparable.  There is no general rule for hyphenation that 
> applies to all
> languages, and tyring to invent ad-hoc hyphenators based on simplistic 
> rules is a Really
> Bad Idea.  There are some good works on hyphenation techniques out there, 
> if this were the
> problem domain (which we don't actually know).
>
> My recollection is that Hebrew has no vowels at all, although it has vowel 
> marks, but it
> has been decades since I had anyone who knew the language explain it to 
> me, so my memory
> is fuzzy.
>
> However, since it is already hard in English, I find the likelihood that 
> there is a
> single, universal rule that can apply to all languages somewhat 
> problematic.  Some
> languages (as pointed out, Italian) may have simple rules, but other 
> languages might have
> rules that make English look trivial.
> joe

0
tom.nospam (3240)
5/5/2007 4:55:25 PM
On Fri, 4 May 2007 11:38:29 +0100, "David Webber"
<dave@musical-dot-demon-dot-co.uk> wrote:

>Italian would also need accented characters of course - eg  "pi�"  if I 
>remember right (and if the newsgroup accepts the accented u).

Yes, you're right David: there are accented characters, too. They are
located at the end of the word ("perch�", "poich�", "pi�",...)
So the look up could include also the accented vowels...


>Obviously in languages where a glyph represents a whole syllable, you cannot 
>classify symbols into vowels and consonants - so that's most of the unicode 
>code points out for a start :-)

:)


>(Very few languages are 
>as phonetic as Italian is, and most have a more complex array of vowel 
>sounds.)

That's true.


>(What about the first "i" in the Italian word "ieri"????)

Yes, in Italian there are sounds made up by two vowels called
"dittonghi" (I think "diphthongs" in English).

But I'm not a linguistic expert :)

MrAsm
0
mrasm (715)
5/5/2007 5:50:49 PM
http://en.wikipedia.org/wiki/Vowel

"Susan Rice" <srice1@cox.net> wrote in message 
news:NAp_h.291586$7g3.105116@newsfe14.phx...
> Is there a simple way to determine if a character in whatever codepage is 
> a vowel? 

0
anyone3666 (139)
5/5/2007 7:35:22 PM
This came up as I'm working on a spelling checker which does spell 
guessing; that is, if you give it a misspelled word, it tries to guess 
what word you meant. This particular algorithm concentrates on common 
typing mistakes. In English the algorithm is:

  Outline:
     1.  Reversals   (test for transposed characters)
     2.  vowels      (test for wrong vowel used)
     3.  minus chars (test for extra character in word)
     4.  plus chars  (test for character missing from word)
     5.  consonants  (test for wrong character used)
     6.  give up     (give up)

This was easy with a vowel being a,e,i,o,u

Years later I expanded the spelling checker to handle extended ANSI 
characters, such as:

� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �

this allowed for the spelling checker to be used with some foreign 
languages, such as French. The vowels became a,e,i,o,u, with all 
combinations of accents.

a � � � � � � e � � � � i � � � � o � � � � � u � � � �

But this still assumes the user is using the standard codepage (the name 
of which I appologise I don't recall. It's whatever is on my computer).

So I thought to further expand the usefulness of this spelling checker 
so it can handle other foreign (to me) languages, such as Russian, where 
people would be using the codepage cp-1251. But now I no longer know 
what a 'vowel' is in that language.

I could just skip test #2 (test for wrong vowel) and have test #6 handle 
it (test for wrong character used). Perhaps computers are fast enough 
nowadays that it doesn't matter.

The free spelling checker is at
http://www.codeproject.com/cpp/EDXspell.asp

(What I'd really like is if some dictionary company would give their 
dictionary software a callable interface so other programs can ask it if 
a word is misspelled. That way people don't have to supply their own 
lexicon for their language--they can just purchase the commercial 
dictionary which our editor can interface with.)


Susan Rice wrote:
> Is there a simple way to determine if a character in whatever codepage 
> is a vowel?
0
srice1 (41)
5/5/2007 7:52:44 PM
The Microsoft Word spell-checker is the outcome of substantial effort in Microsoft
Research to build a smart spell-checker

I recall from work I was involved with many years ago that there is a huge body of
literature on spellchecking algorithms.  For a large vocabulary, the real trick is in
organizing the database to optimize search time under the various scenarios.
					joe
  
On Sat, 05 May 2007 11:52:44 -0800, Susan Rice <srice1@cox.net> wrote:

>This came up as I'm working on a spelling checker which does spell 
>guessing; that is, if you give it a misspelled word, it tries to guess 
>what word you meant. This particular algorithm concentrates on common 
>typing mistakes. In English the algorithm is:
>
>  Outline:
>     1.  Reversals   (test for transposed characters)
>     2.  vowels      (test for wrong vowel used)
>     3.  minus chars (test for extra character in word)
>     4.  plus chars  (test for character missing from word)
>     5.  consonants  (test for wrong character used)
>     6.  give up     (give up)
>
>This was easy with a vowel being a,e,i,o,u
>
>Years later I expanded the spelling checker to handle extended ANSI 
>characters, such as:
>
>� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
>
>this allowed for the spelling checker to be used with some foreign 
>languages, such as French. The vowels became a,e,i,o,u, with all 
>combinations of accents.
>
>a � � � � � � e � � � � i � � � � o � � � � � u � � � �
>
>But this still assumes the user is using the standard codepage (the name 
>of which I appologise I don't recall. It's whatever is on my computer).
>
>So I thought to further expand the usefulness of this spelling checker 
>so it can handle other foreign (to me) languages, such as Russian, where 
>people would be using the codepage cp-1251. But now I no longer know 
>what a 'vowel' is in that language.
>
>I could just skip test #2 (test for wrong vowel) and have test #6 handle 
>it (test for wrong character used). Perhaps computers are fast enough 
>nowadays that it doesn't matter.
>
>The free spelling checker is at
>http://www.codeproject.com/cpp/EDXspell.asp
>
>(What I'd really like is if some dictionary company would give their 
>dictionary software a callable interface so other programs can ask it if 
>a word is misspelled. That way people don't have to supply their own 
>lexicon for their language--they can just purchase the commercial 
>dictionary which our editor can interface with.)
>
>
>Susan Rice wrote:
>> Is there a simple way to determine if a character in whatever codepage 
>> is a vowel?
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
5/5/2007 11:35:05 PM
> My recollection is that Hebrew has no vowels at all, although it has vowel
> marks, but it has been decades since I had anyone who knew the language
> explain it to me, so my memory is fuzzy.  
Well, Hebrew language has vowels, but they are usually not represented in
writing.
Like this: "Wll, Hbrw hs vwls, bt th r sll nt rprsntd n wrtng" :-)
The vowel marks are sometimes used in children books, learning
material for foreigners, dictionaries (to make it easyer).


-- 
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
0
5/6/2007 7:18:27 AM
Yes, that's what I meant.  
			joe
On Sun, 06 May 2007 00:18:27 -0700, "Mihai N." <nmihai_year_2000@yahoo.com> wrote:

>> My recollection is that Hebrew has no vowels at all, although it has vowel
>> marks, but it has been decades since I had anyone who knew the language
>> explain it to me, so my memory is fuzzy.  
>Well, Hebrew language has vowels, but they are usually not represented in
>writing.
>Like this: "Wll, Hbrw hs vwls, bt th r sll nt rprsntd n wrtng" :-)
>The vowel marks are sometimes used in children books, learning
>material for foreigners, dictionaries (to make it easyer).
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
5/6/2007 3:51:06 PM
"Susan Rice" <srice1@cox.net> wrote in message 
news:So4%h.221297$g24.191472@newsfe12.phx...

> This came up as I'm working on a spelling checker which does spell 
> guessing;...

So for this purpose you know what language you're checking and you need to 
know which glyphs are *usually* vowels in that language.   This should be 
possible but I doubt that there is any standard function to do it.   I would 
think that most languages are simpler than English in this respect - where 
the standard joke is that "ghoti" spells "fish"  (gh as in rough; o as in 
women; ti as in nation).

Dave
-- 
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm

0
dave9996 (486)
5/6/2007 9:49:54 PM
"Tom Serface" <tom.nospam@camaswood.com> wrote in message 
news:EB23945D-DA81-46CB-AE65-28169571CA6D@microsoft.com...
> English is a difficult language.  For example, we have a rule that you 
> should put 'i' after 'e', except after 'c' except in words that where it 
> sounds like a 'a' like in 'neighbor' or 'weigh'.

Yes, English pretends to have that rule and those exceptions.  Not the 
height of foreign languages but weird enough to notice.

> Then the most intelligent guy ever here "Einstein" got it wrong twice in 
> his own name.

You'll have to issue him a fake birth certificate (English or American or 
whatever) in order to tell that joke about him.

But you were born in an English-writing country, right?  Why'd you misspell 
Surface? 

0
ndiamond1 (258)
5/7/2007 6:48:56 AM
> Yes, English pretends to have that rule and those exceptions.
> Not the height of foreign languages but weird enough to notice.
Oh, many foreign languages have way easier and more consistent rules.
And there others that are worse.
Probably English is somewhere in the middle (based on statistics :-)


-- 
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
0
5/7/2007 7:42:05 AM
LOL... touch�...  So you've never heard the  "'u' after 's' except before 
'r' when followed by 'f'' then always use 'e'" rule?

FWIW, it's better than the orignal German spelling "Serfass" that was 
changed several generations ago.

To be fair, I didn't claim Einstein as a native.  I just said he was "here" 
Like me he probably had little choice over the spelling of his name

:o)

Tom

"Norman Diamond" <ndiamond@community.nospam> wrote in message 
news:%233b7NPHkHHA.3996@TK2MSFTNGP06.phx.gbl...
> "Tom Serface" <tom.nospam@camaswood.com> wrote in message 
> news:EB23945D-DA81-46CB-AE65-28169571CA6D@microsoft.com...

> Yes, English pretends to have that rule and those exceptions.  Not the 
> height of foreign languages but weird enough to notice.
>
>> Then the most intelligent guy ever here "Einstein" got it wrong twice in 
>> his own name.
>
> You'll have to issue him a fake birth certificate (English or American or 
> whatever) in order to tell that joke about him.
>
> But you were born in an English-writing country, right?  Why'd you 
> misspell Surface? 

0
tom.nospam (3240)
5/7/2007 2:34:38 PM
I was in Egypt once and a taxi driver told me of his trip to the US years 
ago.  "The most amazing thing", said he, "is that 2-year-olds there can 
speak English".  He then tried to teach me a few words of Arabic and I 
failed miserably sounding mostly like I was coughing up a hairball.  I think 
all language is complex and somehow as children we are able to assimilate 
them without giving it much thought.  It's part of the miracle of being 
human.

Tom

"Mihai N." <nmihai_year_2000@yahoo.com> wrote in message 
news:Xns992972A11893MihaiN@207.46.248.16...
>> Yes, English pretends to have that rule and those exceptions.
>> Not the height of foreign languages but weird enough to notice.
> Oh, many foreign languages have way easier and more consistent rules.
> And there others that are worse.
> Probably English is somewhere in the middle (based on statistics :-)
>
>
> -- 
> Mihai Nita [Microsoft MVP, Windows - SDK]
> http://www.mihai-nita.net
> ------------------------------------------
> Replace _year_ with _ to get the real email 

0
tom.nospam (3240)
5/7/2007 2:36:49 PM
Some years ago I became convinced that we are teaching programming all wrong.  So I
acquired some books on infant learning and language learning, and discovered that I was
indeed right.  

Imagine the following: we lock a child in a room for 18 years, feed him or her through a
slot, and the person has no human contact.  Then we take them out and try to teach them
English by saying "A noun is a name word, and names a person, place or thing.  A verb
describes an action or state of being.  An adjective modifies a noun..." and see how far
you get.  But we have no qualms about teaching programming to people who have no
background by telling them about variables, control structures, functions, etc.  They have
no basis of expectation.  So we get people who end up being really bad programmers.  A few
of this overcome this and become good programmers.

So I started teaching by teaching algorithms and data structures without code.  I taught
an 11-year-old how to program in this fashion; by 12 he was "programming" in C by writing
the comments about what he wanted to do, and I played compiler and compiled his comments
into C code.  By 13 he was using pointers comfortably.  He graduated a couple years ago
with a degree in computer graphics.  

We program best by imitation.  Imitation is hardwired into our ROMs (not even our personal
firmware, but our personal ROMs).  So why don't we teach programming like we teach
speaking?  Immediate feedback "no, the past tense of sit is not sitted, but sat".  A
friend of mine came from Europe and it was fascinating to watch his children (all
preschool) acquire English.  It was all by imitation.  When we have visited friends in
Europe, the children are thrilled to meet native English speakers and they try out their
vocabulary on us.  They are amazed and confused by idomatic English--and phrases like "I
gotta getta cuppa coffee" use words they never learned (the contraction of "to" or "of" to
a suffix "a" of the previous word).  But idioms of programming are commonplace and  not
readily learned.

You can learn a lot of bad programming habits by reading bad code and not know it's bad
code.  

Sounds are fascinating.  Most English native speakers can't get the German umlaut sounds,
or the sounds of Dutch (the town of "Geim" sounds like a throat problem), or sounds of
non-IndoEuropean languages like Finnish or Hungarian.  I once worked with a Finn whose
name was obviously simple to pronounce, until he told me that was his English name.  I
could not reproduce the sounds he gave for his Finnish name (which is spelled the same way
as his English name, using the exact same letters).  We were visiting a friend in Holland,
and asked for him by name.  Nobody at the reception desk knew who we were asking for until
we wrote it down, and they said, "Oh, ***********" (some incomprehensible sounds) and
called him immediately!  These patterns are usually recognized by children as young as 6
months (children at that age, if they are native English speakers and here a Swedish voice
will start looking around.  Swedish children have the same reaction to English voices),
and the "childish babbling" is the child learning to imitate those sounds they hear.  

I have been accused of speaking German with a Czech accent; my college German teacher was
a Czech immigrant, and I imitate her accent (imagine a native German speaker learning
English from someone from deep Alabama and you get the idea).

We are incredibly flexible creatures.  One of my "student exercises" in a computer
internals course I gave (to 13-year-olds), was to "program" me to sweep the floor.  I
played a computer, and did EXACTLY what they told me to do (nothing more, nothing less).
Another example I used was "Your Internet buddy from someplace in Africa or India [or
someplace of your choice] is coming to visit you.  [He, she] has just gotten genuine
"American" clothes, including a pair of shoes.  [He, she] wants to know how to tie them.
Explain to your buddy by email how to tie a shoe.  No pictures because your buddy is on
the other end of a 2400-baud line. 

Knowledge acquisition is a fascinating problem to study.
					joe

On Mon, 7 May 2007 07:36:49 -0700, "Tom Serface" <tom.nospam@camaswood.com> wrote:

>I was in Egypt once and a taxi driver told me of his trip to the US years 
>ago.  "The most amazing thing", said he, "is that 2-year-olds there can 
>speak English".  He then tried to teach me a few words of Arabic and I 
>failed miserably sounding mostly like I was coughing up a hairball.  I think 
>all language is complex and somehow as children we are able to assimilate 
>them without giving it much thought.  It's part of the miracle of being 
>human.
>
>Tom
>
>"Mihai N." <nmihai_year_2000@yahoo.com> wrote in message 
>news:Xns992972A11893MihaiN@207.46.248.16...
>>> Yes, English pretends to have that rule and those exceptions.
>>> Not the height of foreign languages but weird enough to notice.
>> Oh, many foreign languages have way easier and more consistent rules.
>> And there others that are worse.
>> Probably English is somewhere in the middle (based on statistics :-)
>>
>>
>> -- 
>> Mihai Nita [Microsoft MVP, Windows - SDK]
>> http://www.mihai-nita.net
>> ------------------------------------------
>> Replace _year_ with _ to get the real email 
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
5/8/2007 3:39:47 AM
Indeed... nice read :o)  I love teaching too.  Although, I've found over the 
years that whenever I teach a class I learn as much as the people I am 
teaching. Maybe that's why I love it.

Tom

"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:ijqv33pi96kjm40j8hnoi78kvnm1fj4bc7@4ax.com...
>
> Knowledge acquisition is a fascinating problem to study.
> joe
>
> On Mon, 7 May 2007 07:36:49 -0700, "Tom Serface" 
> <tom.nospam@camaswood.com> wrote:

0
tom.nospam (3240)
5/8/2007 3:47:59 AM
When you stop learning from your students, it's time to retire.  I look forward to a long
career.
					joe
On Mon, 7 May 2007 20:47:59 -0700, "Tom Serface" <tom.nospam@camaswood.com> wrote:

>Indeed... nice read :o)  I love teaching too.  Although, I've found over the 
>years that whenever I teach a class I learn as much as the people I am 
>teaching. Maybe that's why I love it.
>
>Tom
>
>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
>news:ijqv33pi96kjm40j8hnoi78kvnm1fj4bc7@4ax.com...
>>
>> Knowledge acquisition is a fascinating problem to study.
>> joe
>>
>> On Mon, 7 May 2007 07:36:49 -0700, "Tom Serface" 
>> <tom.nospam@camaswood.com> wrote:
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
5/8/2007 4:24:28 AM
I love your anecdotes Joe :-)

When I left home (in the North East of England), to go to University (in 
middle England) the locals had great difficulty understanding my accent. The 
bus to Uni was a problem and I was often (over)charged an incorrect fare 
because they couldn't understand me. I had to modify my speach quickly. When 
I went home for Christmas my young cousin commented "Doesn't he talk funny!" 
For four years I did't fit in anywhere :-(
I wonder if I program with an accent.

Les 


0
5/8/2007 9:28:11 AM
I could barely ready your post... the accent was so thick.

Tom

"Les" <l.neilson@nospam.acecad.co.uk> wrote in message 
news:f1pfs3$6hj$1@newsreader.cw.net...
>I love your anecdotes Joe :-)
>
> When I left home (in the North East of England), to go to University (in 
> middle England) the locals had great difficulty understanding my accent. 
> The bus to Uni was a problem and I was often (over)charged an incorrect 
> fare because they couldn't understand me. I had to modify my speach 
> quickly. When I went home for Christmas my young cousin commented "Doesn't 
> he talk funny!" For four years I did't fit in anywhere :-(
> I wonder if I program with an accent.
>
> Les
> 

0
tom.nospam (3240)
5/8/2007 2:41:25 PM
Yes, we all program with an accent.  It is so noticeable that I can pretty much tell which
textbook was used in an intro programming course taken by the programmer.  In a WIndows
programmer, you can spot a "Petzold accent" quite readily (poor code structure, lots of
global variables...) Not only do we have accents, we have "speech affectations" (I have my
own, carefully cultivated, y'know old chappie.  Like my use of comments after nearly every
{ and }.).  Some accents are so strong that the code is unreadable; for example, people
who put commas in declaration lists, and don't put spaces around operators or after
commas, are nearly unintelligible.  People who put more than one statement on a line are
very hard to understand.  People who put a { at the end of a line instead of on the next
line, properly indented.  And so on.
					joe
On Tue, 8 May 2007 10:28:11 +0100, "Les" <l.neilson@nospam.acecad.co.uk> wrote:

>I love your anecdotes Joe :-)
>
>When I left home (in the North East of England), to go to University (in 
>middle England) the locals had great difficulty understanding my accent. The 
>bus to Uni was a problem and I was often (over)charged an incorrect fare 
>because they couldn't understand me. I had to modify my speach quickly. When 
>I went home for Christmas my young cousin commented "Doesn't he talk funny!" 
>For four years I did't fit in anywhere :-(
>I wonder if I program with an accent.
>
>Les 
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
5/8/2007 2:46:02 PM
You wouldn't like K&R accent, would you? Try to read IP stack code from BSD. 
Oh no, you'll get sick.

"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:gt2143hlanisbp0okq6mtb5ufsdgium0vk@4ax.com...
> Yes, we all program with an accent.  It is so noticeable that I can pretty 
> much tell which
> textbook was used in an intro programming course taken by the programmer. 
> In a WIndows
> programmer, you can spot a "Petzold accent" quite readily (poor code 
> structure, lots of
> global variables...) Not only do we have accents, we have "speech 
> affectations" (I have my
> own, carefully cultivated, y'know old chappie.  Like my use of comments 
> after nearly every
> { and }.).  Some accents are so strong that the code is unreadable; for 
> example, people
> who put commas in declaration lists, and don't put spaces around operators 
> or after
> commas, are nearly unintelligible.  People who put more than one statement 
> on a line are
> very hard to understand.  People who put a { at the end of a line instead 
> of on the next
> line, properly indented.  And so on.
> joe


0
alegr (1131)
5/8/2007 3:08:26 PM
On Tue, 08 May 2007 10:46:02 -0400, Joseph M. Newcomer
<newcomer@flounder.com> wrote:

>Yes, we all program with an accent.  It is so noticeable that I can pretty much tell which
>textbook was used in an intro programming course taken by the programmer.  In a WIndows
>programmer, you can spot a "Petzold accent" quite readily (poor code structure, lots of
>global variables...) Not only do we have accents, we have "speech affectations" (I have my
>own, carefully cultivated, y'know old chappie.  Like my use of comments after nearly every
>{ and }.).  Some accents are so strong that the code is unreadable; for example, people
>who put commas in declaration lists, and don't put spaces around operators or after
>commas, are nearly unintelligible.  People who put more than one statement on a line are
>very hard to understand.  People who put a { at the end of a line instead of on the next
>line, properly indented.  And so on.
>					joe

Please, no one get any ideas about updating "My Fair Lady".

-- 
Doug Harrison
Visual C++ MVP
0
dsh (2498)
5/8/2007 3:34:28 PM
Hey... I resemble that remark.  It's kind of like top posting.  I don't have 
enough lines on the screen to waste lines with { or } on their own lines. 
I've seen people write like this:

if(i == 0)
{
    // Do something
}
else
{
    // Do something else
}

but I like doing it like this:

if( i == 0 ) {
    // Do something
}
else {
    // Do something else
}

I can now display 2 more lines on the screen than I could before.  I top 
post because I think bottom posting is dumb as well. Why people want to 
scroll through tons of lines of stuff they've already read before to get to 
the latest text is beyond me.   It's kind of like flipping through the part 
of a book you've already read before getting to the part where you want to 
pick up reading.

I will also often do something like:

if ( i == 0)
    i = 10;
else
    i = 12;

If there is only one statement, but I would never put it on the same line as 
the if statement.  I have to have some guidelines.  I also make special 
exception for function setup:

void MyClass::MyFunction( UINT nSomething, CString csSomethingElse )
{
}

To set that off.  What I really have a difficult time with is the style that 
looks like:

if(i == 0)
    {
    // Do something
    }
else
    {
    // Do something else
    }

I guess styles are like standards... there are so many to choose from.

Tom

"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:gt2143hlanisbp0okq6mtb5ufsdgium0vk@4ax.com...
> People who put a { at the end of a line instead of on the next
> line, properly indented.  And so on.
> joe

0
tom.nospam (3240)
5/8/2007 4:49:51 PM
Computer education in schools seems to be measured by the number of 
computers in the school. The more computers, the better the education.

If it was up to me, there would be no computers in primary schools 
(elementary schools in the US ?). Students should learn all the precepts of 
being able to program without a computer, eg logic, analysis etc (as well as 
learning how to write which would be a bonus).

As it is, all they are learning is current technology and do not have an 
open mind to adapt to what is going to come 20 years down the track. Being a 
whizz at Word or being able to hack code using JavaScript or PHP does not in 
my opinion constitute education. Once the fundamentals of programming are 
grasped, being able to adapt to the syntax of a particular language or 
operating environment is no big deal.


"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:ijqv33pi96kjm40j8hnoi78kvnm1fj4bc7@4ax.com...
> Some years ago I became convinced that we are teaching programming all 
> wrong.  So I
> acquired some books on infant learning and language learning, and 
> discovered that I was
> indeed right.
>
> Imagine the following: we lock a child in a room for 18 years, feed him or 
> her through a
> slot, and the person has no human contact.  Then we take them out and try 
> to teach them
> English by saying "A noun is a name word, and names a person, place or 
> thing.  A verb
> describes an action or state of being.  An adjective modifies a noun..." 
> and see how far
> you get.  But we have no qualms about teaching programming to people who 
> have no
> background by telling them about variables, control structures, functions, 
> etc.  They have
> no basis of expectation.  So we get people who end up being really bad 
> programmers.  A few
> of this overcome this and become good programmers.
>
> So I started teaching by teaching algorithms and data structures without 
> code.  I taught
> an 11-year-old how to program in this fashion; by 12 he was "programming" 
> in C by writing
> the comments about what he wanted to do, and I played compiler and 
> compiled his comments
> into C code.  By 13 he was using pointers comfortably.  He graduated a 
> couple years ago
> with a degree in computer graphics.
>

......

 

0
anyone3666 (139)
5/8/2007 7:55:49 PM
I agree entirely.  A programming language is merely a tool.  No mechanic was intimidated
when foreign cars required metric tool sets, because they knew how to use the tool.
Programming is the same.  Most of us can pick up a new language, insofar as the syntax, in
about a week (learning the massive class libraries for Java, C#, or MFC is another story
entirely...) because we understand the key ideas: statements, conditionals, loops,
assignment, functions, parameters, scope of variables, etc.  The rest is just meaningless
syntactic rules.

I tend to object to educators who say "We can't use computers because we don't want to
teach today's technology---by the time our students graduate, [Word, Pascal, C, Java] will
be obsolete and they'll have to learn something new!"  I point out that if they did their
jobs right, the students will have all the key principles.  "Well, here's the analogy.
Let's not teach the multiplication tables, because (a) everyone has calculators and (b)
the tables only go up to 9x9 and they'll have bigger numbers to multiply".  The same
teachers who tell me that learning Word is worthless because the students might end up
using WordPerfect will passionately defend teaching multiplication tables because this
allows general principles to be taught...they don't see that Word just a tool, and once a
student knows how a text editor works, nearly all text editors work the same way (we will
ignore vi as a text editor, because it's crap anyway)
						joe

On Wed, 9 May 2007 05:55:49 +1000, "Ian Semmel" <anyone@rocketcomp.com.au> wrote:

>Computer education in schools seems to be measured by the number of 
>computers in the school. The more computers, the better the education.
>
>If it was up to me, there would be no computers in primary schools 
>(elementary schools in the US ?). Students should learn all the precepts of 
>being able to program without a computer, eg logic, analysis etc (as well as 
>learning how to write which would be a bonus).
>
>As it is, all they are learning is current technology and do not have an 
>open mind to adapt to what is going to come 20 years down the track. Being a 
>whizz at Word or being able to hack code using JavaScript or PHP does not in 
>my opinion constitute education. Once the fundamentals of programming are 
>grasped, being able to adapt to the syntax of a particular language or 
>operating environment is no big deal.
>
>
>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
>news:ijqv33pi96kjm40j8hnoi78kvnm1fj4bc7@4ax.com...
>> Some years ago I became convinced that we are teaching programming all 
>> wrong.  So I
>> acquired some books on infant learning and language learning, and 
>> discovered that I was
>> indeed right.
>>
>> Imagine the following: we lock a child in a room for 18 years, feed him or 
>> her through a
>> slot, and the person has no human contact.  Then we take them out and try 
>> to teach them
>> English by saying "A noun is a name word, and names a person, place or 
>> thing.  A verb
>> describes an action or state of being.  An adjective modifies a noun..." 
>> and see how far
>> you get.  But we have no qualms about teaching programming to people who 
>> have no
>> background by telling them about variables, control structures, functions, 
>> etc.  They have
>> no basis of expectation.  So we get people who end up being really bad 
>> programmers.  A few
>> of this overcome this and become good programmers.
>>
>> So I started teaching by teaching algorithms and data structures without 
>> code.  I taught
>> an 11-year-old how to program in this fashion; by 12 he was "programming" 
>> in C by writing
>> the comments about what he wanted to do, and I played compiler and 
>> compiled his comments
>> into C code.  By 13 he was using pointers comfortably.  He graduated a 
>> couple years ago
>> with a degree in computer graphics.
>>
>
>.....
>
> 
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
5/9/2007 4:54:30 AM
> People who put a { at the end of a line instead of on the next
> line, properly indented.

That is the K&R style and I consider it "proper indentation" :-)
http://en.wikipedia.org/wiki/Indent_style

I can also live with Allman or BSD styles, but I find Whitesmiths and
GNU styles quite bad, and Pico + Banner outright horible.

But this is, of course, a "holy war," so I will not comment further :-)


-- 
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
0
5/9/2007 8:47:18 AM
> I will also often do something like:
> 
> if ( i == 0)
>     i = 10;
> else
>     i = 12;
So what about this:
  i = (i == 0) ? 10 : 12;
or even
  i = i ? 12 : 10;


-- 
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
0
5/9/2007 8:49:16 AM
In article news:<F939F68D-4542-432B-A006-9330D2295C8B@microsoft.com>, Tom 
Serface wrote:
> Hey... I resemble that remark.  It's kind of like top posting.  I don't have 
> enough lines on the screen to waste lines with { or } on their own lines.

Are you trying to start a flame war, here, or what? <smile>

> I don't have enough lines on the screen to waste lines with { or } on their
> own lines. 

There are never enough lines on screen ... but being able to see a small amount 
of well-laid-out code is much more useful than being able to see a larger 
amount of poorly-laid-out code.

> I've seen people write like this:
[snip well-laid-out code with braces given lines to themselves]

Yup, that's how I do it.

> but I like doing it like this:
[snip K&R-style code with opening braces at the ends of the preceding lines]

You, sir, are the spawn of Satan!

> I top post because I think bottom posting is dumb as well. Why people want
> to scroll through tons of lines of stuff they've already read before to get
> to the latest text is beyond me.

You're missing the point about bottom-posting. You're suppose to trim the post 
you're replying to down to just a few lines to give context to your reply NOT 
to reproduce the whole thing. Bad bottom posting is just as bad as top posting.

> I will also often do something like:
> 
> if ( i == 0)
>     i = 10;
> else
>     i = 12;

One reason not to do that (apart from the obvious aesthetic ones) is that it 
creates noise in diff. If you later want to change that to (say):

  if ( i == 0)
  {
      i = 10;
      k = 99;
  }
  else
      i = 12;

a diff comparison of the two will show the added braces as well as the line of 
code. You may think that's a small thing, but it does add significantly to the 
complexity of the output for a very small change -- better by far to have the 
braces in all along.

> What I really have a difficult time with is the style that 
> looks like:
[snip completely horrible code with indented braces. Oh yuk!]

OK, I take it back. *That* is the way the spawn of Satan code.

... and I think Joe does too (did I mention that it's just a matter of taste?)

> I guess styles are like standards... there are so many to choose from.

You may laugh ...

The trouble with styles is that they *are* largely matters of taste that have 
no direct bearing on the productivity or efficiency of the coding process. That 
means they waste more sound and heat than almost any other aspect of the coding 
process.

Remember: De gustibus non disputandum est.

Cheers,
 Daniel.
 

0
wastebasket (364)
5/9/2007 9:48:08 AM
I agree as well.  I think it is more important to know "what" can be done 
than it is to know how to do it.  There are so many tools available to give 
you the information to use when you need it that understanding the process 
is way more important than memorizing the syntax.  When my kids were in 
school they were touting LOGO (with turtle graphics) as the great teaching 
tool for kids.  Kids these days would not be impressed with that little 
triangle thing they called a turtle.  At the time it got my kids using the 
computer and that was the key.

When my oldest daughter was really small (couldn't talk yet) I wrote a 
program we called "Press Return" where she would press a key, then press 
Return and the letter would get big on the screen.  Simple program, but back 
in 1983 she thought it was a lot of fun and she has become very comfortable 
using the computer since.  She isn't a programmer, but she is a very 
knowledgable user.

Tom

"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:fkk243hdt22lohlivltv5tq7bdr8nmcb7g@4ax.com...
>I agree entirely.  A programming language is merely a tool.  No mechanic 
>was intimidated
> when foreign cars required metric tool sets, because they knew how to use 
> the tool.
> Programming is the same.  Most of us can pick up a new language, insofar 
> as the syntax, in
> about a week (learning the massive class libraries for Java, C#, or MFC is 
> another story
> entirely...) because we understand the key ideas: statements, 
> conditionals, loops,
> assignment, functions, parameters, scope of variables, etc.  The rest is 
> just meaningless
> syntactic rules.
>
> I tend to object to educators who say "We can't use computers because we 
> don't want to
> teach today's technology---by the time our students graduate, [Word, 
> Pascal, C, Java] will
> be obsolete and they'll have to learn something new!"  I point out that if 
> they did their
> jobs right, the students will have all the key principles.  "Well, here's 
> the analogy.
> Let's not teach the multiplication tables, because (a) everyone has 
> calculators and (b)
> the tables only go up to 9x9 and they'll have bigger numbers to multiply". 
> The same
> teachers who tell me that learning Word is worthless because the students 
> might end up
> using WordPerfect will passionately defend teaching multiplication tables 
> because this
> allows general principles to be taught...they don't see that Word just a 
> tool, and once a
> student knows how a text editor works, nearly all text editors work the 
> same way (we will
> ignore vi as a text editor, because it's crap anyway)
> joe
>
> On Wed, 9 May 2007 05:55:49 +1000, "Ian Semmel" <anyone@rocketcomp.com.au> 
> wrote:
>
>>Computer education in schools seems to be measured by the number of
>>computers in the school. The more computers, the better the education.
>>
>>If it was up to me, there would be no computers in primary schools
>>(elementary schools in the US ?). Students should learn all the precepts 
>>of
>>being able to program without a computer, eg logic, analysis etc (as well 
>>as
>>learning how to write which would be a bonus).
>>
>>As it is, all they are learning is current technology and do not have an
>>open mind to adapt to what is going to come 20 years down the track. Being 
>>a
>>whizz at Word or being able to hack code using JavaScript or PHP does not 
>>in
>>my opinion constitute education. Once the fundamentals of programming are
>>grasped, being able to adapt to the syntax of a particular language or
>>operating environment is no big deal.
>>
>>
>>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
>>news:ijqv33pi96kjm40j8hnoi78kvnm1fj4bc7@4ax.com...
>>> Some years ago I became convinced that we are teaching programming all
>>> wrong.  So I
>>> acquired some books on infant learning and language learning, and
>>> discovered that I was
>>> indeed right.
>>>
>>> Imagine the following: we lock a child in a room for 18 years, feed him 
>>> or
>>> her through a
>>> slot, and the person has no human contact.  Then we take them out and 
>>> try
>>> to teach them
>>> English by saying "A noun is a name word, and names a person, place or
>>> thing.  A verb
>>> describes an action or state of being.  An adjective modifies a noun..."
>>> and see how far
>>> you get.  But we have no qualms about teaching programming to people who
>>> have no
>>> background by telling them about variables, control structures, 
>>> functions,
>>> etc.  They have
>>> no basis of expectation.  So we get people who end up being really bad
>>> programmers.  A few
>>> of this overcome this and become good programmers.
>>>
>>> So I started teaching by teaching algorithms and data structures without
>>> code.  I taught
>>> an 11-year-old how to program in this fashion; by 12 he was 
>>> "programming"
>>> in C by writing
>>> the comments about what he wanted to do, and I played compiler and
>>> compiled his comments
>>> into C code.  By 13 he was using pointers comfortably.  He graduated a
>>> couple years ago
>>> with a degree in computer graphics.
>>>
>>
>>.....
>>
>>
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm 

0
tom.nospam (3240)
5/9/2007 1:29:00 PM
Yeah, we all have to take up our cross on occasion.  Fortunately, none of us 
would be so arrogant as to say that one way is "the right way" since they 
all compile just fine.

Tom

"Mihai N." <nmihai_year_2000@yahoo.com> wrote in message 
news:Xns992B1239361DBMihaiN@207.46.248.16...
>> People who put a { at the end of a line instead of on the next
>> line, properly indented.
>
> That is the K&R style and I consider it "proper indentation" :-)
> http://en.wikipedia.org/wiki/Indent_style
>
> I can also live with Allman or BSD styles, but I find Whitesmiths and
> GNU styles quite bad, and Pico + Banner outright horible.
>
> But this is, of course, a "holy war," so I will not comment further :-)
>
>
> -- 
> Mihai Nita [Microsoft MVP, Windows - SDK]
> http://www.mihai-nita.net
> ------------------------------------------
> Replace _year_ with _ to get the real email 

0
tom.nospam (3240)
5/9/2007 1:30:00 PM
I use ternaries all the time.  They use even less screen space and I find 
them very easy to read.  I like the first form in this case since 'i' isn't 
a boolean type, but the second test would logically work (I would just find 
it confusing if I came back later :o)

Tom

"Mihai N." <nmihai_year_2000@yahoo.com> wrote in message 
news:Xns992B128E9328MihaiN@207.46.248.16...
>> I will also often do something like:
>>
>> if ( i == 0)
>>     i = 10;
>> else
>>     i = 12;
> So what about this:
>  i = (i == 0) ? 10 : 12;
> or even
>  i = i ? 12 : 10;
>
>
> -- 
> Mihai Nita [Microsoft MVP, Windows - SDK]
> http://www.mihai-nita.net
> ------------------------------------------
> Replace _year_ with _ to get the real email 

0
tom.nospam (3240)
5/9/2007 1:31:53 PM
That's OK.  I'm friends with people from all kinds of denominations.  You 
are right.  Disputing "taste" seems like a tasteless endeavor.

Tom

"Daniel James" <wastebasket@nospam.aaisp.org> wrote in message 
news:VA.000010af.7ef4b3de@nospam.aaisp.org...
> In article news:<F939F68D-4542-432B-A006-9330D2295C8B@microsoft.com>, Tom
> Serface wrote:
>> Hey... I resemble that remark.  It's kind of like top posting.  I don't 
>> have
>> enough lines on the screen to waste lines with { or } on their own lines.
>
> Are you trying to start a flame war, here, or what? <smile>
>
>> I don't have enough lines on the screen to waste lines with { or } on 
>> their
>> own lines.
>
> There are never enough lines on screen ... but being able to see a small 
> amount
> of well-laid-out code is much more useful than being able to see a larger
> amount of poorly-laid-out code.
>
>> I've seen people write like this:
> [snip well-laid-out code with braces given lines to themselves]
>
> Yup, that's how I do it.
>
>> but I like doing it like this:
> [snip K&R-style code with opening braces at the ends of the preceding 
> lines]
>
> You, sir, are the spawn of Satan!
>
>> I top post because I think bottom posting is dumb as well. Why people 
>> want
>> to scroll through tons of lines of stuff they've already read before to 
>> get
>> to the latest text is beyond me.
>
> You're missing the point about bottom-posting. You're suppose to trim the 
> post
> you're replying to down to just a few lines to give context to your reply 
> NOT
> to reproduce the whole thing. Bad bottom posting is just as bad as top 
> posting.
>
>> I will also often do something like:
>>
>> if ( i == 0)
>>     i = 10;
>> else
>>     i = 12;
>
> One reason not to do that (apart from the obvious aesthetic ones) is that 
> it
> creates noise in diff. If you later want to change that to (say):
>
>  if ( i == 0)
>  {
>      i = 10;
>      k = 99;
>  }
>  else
>      i = 12;
>
> a diff comparison of the two will show the added braces as well as the 
> line of
> code. You may think that's a small thing, but it does add significantly to 
> the
> complexity of the output for a very small change -- better by far to have 
> the
> braces in all along.
>
>> What I really have a difficult time with is the style that
>> looks like:
> [snip completely horrible code with indented braces. Oh yuk!]
>
> OK, I take it back. *That* is the way the spawn of Satan code.
>
> .. and I think Joe does too (did I mention that it's just a matter of 
> taste?)
>
>> I guess styles are like standards... there are so many to choose from.
>
> You may laugh ...
>
> The trouble with styles is that they *are* largely matters of taste that 
> have
> no direct bearing on the productivity or efficiency of the coding process. 
> That
> means they waste more sound and heat than almost any other aspect of the 
> coding
> process.
>
> Remember: De gustibus non disputandum est.
>
> Cheers,
> Daniel.
>
> 

0
tom.nospam (3240)
5/9/2007 1:34:40 PM
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:ijqv33pi96kjm40j8hnoi78kvnm1fj4bc7@4ax.com...

I agree with what you say on programming and...

>....  A
> friend of mine came from Europe and it was fascinating to watch his 
> children (all
> preschool) acquire English.  It was all by imitation.  When we have 
> visited friends in
> Europe, the children are thrilled to meet native English speakers and they 
> try out their
> vocabulary on us.  They are amazed and confused by idomatic English--and 
> phrases like "I
> gotta getta cuppa coffee" use words they never learned (the contraction of 
> "to" or "of" to
> a suffix "a" of the previous word).

... yes - us Europeans definitely have difficulty with "I gotta".   In my 
language it would be "I've got to..." where this is one idiomatic usage of 
the past tense of to "get" (We discarded the archaic version of the 
participle - "gotten" - a long time ago).   In American it appears that a 
new verb has arrived on the scene - "to got"  as in "I got a dog",  (with a 
present sense of state as in "I have a dog" in place of our past tense "I've 
got a dog"  quite different from the simple past meaning "I went and 
acquired a dog" which it would have here).   I have heard the interrogative 
form "Do you got a dog?"  and the negative "I don't got a dog" but not yet 
the future tense (presumably "I gonna got a dog" which would be subtly 
different from "I gonna get a dog" as "got" is to do with ownership and 
"get" to do with acquisition).

> Sounds are fascinating.  Most English native speakers can't get the German 
> umlaut sounds,
> or the sounds of Dutch (the town of "Geim" sounds like a throat problem),

That is pure laziness - or fear of looking silly if you try and make the 
right noise.  There is nothing intrinsically difficult with them.   [Here in 
the North of England our saxon vowels are very close to German, and Scots, 
Welsh, and Liverpudlian all have the dutch 'g' sound (or hard german 'ch').] 
I claim to be one of the few Brits who can pronounce the Swiss German word 
"Chaesechueechli" without spitting.  Standard German (Kaesekuchlein) and 
Dutch are for amateurs by comparison :-)

>or sounds of
> non-IndoEuropean languages like Finnish or Hungarian.  I once worked with 
> a Finn whose
> name was obviously simple to pronounce, until he told me that was his 
> English name.  I
> could not reproduce the sounds he gave for his Finnish name (which is 
> spelled the same way
> as his English name, using the exact same letters).

I never found Finnish difficult to pronounce.  You just have to remember to 
pronounce the double consonants.  Once my mate Jaakko had explained that the 
k's were like in bookkeeper, then there was no problem.   The structure of 
the language itself is a different matter!

> We were visiting a friend in Holland,
> and asked for him by name.  Nobody at the reception desk knew who we were 
> asking for until
> we wrote it down, and they said, "Oh, ***********" (some incomprehensible 
> sounds) and
> called him immediately!

Again dutch vowel sounds have their own logic.   "ou" is pronounced like ou 
in "out";  "ui" is pronounced like the "ou" in "out" is pronounced by a 
resident of Wigan (who will be puzzled by the first one).   :-)

> I have been accused of speaking German with a Czech accent; my college 
> German teacher was
> a Czech immigrant, and I imitate her accent (imagine a native German 
> speaker learning
> English from someone from deep Alabama and you get the idea).

I have been accused of speaking it with a Swiss accent - I learnt it when 
lived in Zurich in the 1970s.

> We are incredibly flexible creatures.

And our strength is, as you say, learning by imitation.   Adults have to 
transcend the idea that they might look stupid doing it: children learn 
faster as they have no such handicap :-)

Always run before you can walk:   just get used to the idea that falling 
over is an integral part of the process of learning.

Dave
-- 
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm

0
dave9996 (486)
5/9/2007 1:45:07 PM
"Les" <l.neilson@nospam.acecad.co.uk> wrote in message 
news:f1pfs3$6hj$1@newsreader.cw.net...


> When I left home (in the North East of England), to go to University (in 
> middle England) the locals had great difficulty understanding my accent. 
> The bus to Uni was a problem and I was often (over)charged an incorrect 
> fare because they couldn't understand me. I had to modify my speach 
> quickly. When I went home for Christmas my young cousin commented "Doesn't 
> he talk funny!" For four years I did't fit in anywhere :-(

Well you may be more fortunate than vice versa.   After my first breakfast 
asa student at University in the N.E.  (Durham) a new acquaintance from the 
south said:  "That was nice what was it?"   I told him:  "Black pudding". 
You should have seen the face he pulled ;-)

Dave
-- 
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm

0
dave9996 (486)
5/9/2007 1:50:16 PM
"Tom Serface" <tom.nospam@camaswood.com> wrote in message 
news:F939F68D-4542-432B-A006-9330D2295C8B@microsoft.com...


>
> if(i == 0)
> {
>    // Do something
> }
> else
> {
>    // Do something else
> }
>
> but I like doing it like this:
>
> if( i == 0 ) {
>    // Do something
> }
> else {
>    // Do something else
> }
>

I hate that!  I much prefer the first one.

> I can now display 2 more lines on the screen than I could before.

Well you can do better if you're saving lines.

    if( i ) { //do somethng else }
    else  { // something           }

I have no objection to multiple SHORT statements on a line, but i try to 
keep my lines down to 90 characters as I can print chunks neatly if I need 
to.

I have come to forget ==0 and ==NULL most of the time.   Just use !

> I will also often do something like:
>
> if ( i == 0)
>    i = 10;
> else
>    i = 12;
>
> If there is only one statement, but I would never put it on the same line 
> as the if statement.

Whyever not?

But one can get too compact:

    i = i? 12: 10;

would be verging on it :-)

>  I have to have some guidelines....
> I guess styles are like standards... there are so many to choose from.

It's whatever makes your code readable to you when you're maintaining it. 
and we haven't even touched on hungarian prefixes and use of _ or 
capitalisation between syllables of variable names, and....  :-)

Dave
-- 
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm

0
dave9996 (486)
5/9/2007 2:00:48 PM
"Daniel James" <wastebasket@nospam.aaisp.org> wrote in message 
news:VA.000010af.7ef4b3de@nospam.aaisp.org...

>  if ( i == 0)
>  {
>      i = 10;
>      k = 99;
>  }
>  else
>      i = 12;

Ugghh!

    if( i )   { i=12;           }
    else    { i=10; k=99; }

NB:
Two short statements on a line are good!
If one branch has {} then the other has to match!
In a mono font in the editor the two { and the two } MUST ALIGN!

One has to have STANDRADS after all!

I'm all for

if( ..)
{
....
}

but don't do it *gratuitously* :-)


> The trouble with styles is that they *are* largely matters of taste that 
> have
> no direct bearing on the productivity or efficiency of the coding process.

Actually i find them very helpful for efficient maintainability.

> Remember: De gustibus non disputandum est.

Good for Mr Gustibus, I say!

Dave
-- 
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm

0
dave9996 (486)
5/9/2007 2:08:35 PM
"Tom Serface" <tom.nospam@camaswood.com> wrote in message 
news:AB212B51-0566-4812-BA64-85CD2432906A@microsoft.com...

> To be fair, I didn't claim Einstein as a native.  I just said he was 
> "here" Like me he probably had little choice over the spelling of his name

Of course the rule only ever applied if the vowel is pronounced ee, and it 
works even more strong ly in German where ie is pronounced that way and ei 
is prononced as in Einstein.

I suppose he could have become Mr Onestone without actually changing his 
name.   And rather than pronouncing it all wrong Mr Bernstein could have 
become Mr Amber.  :-(

Dave
-- 
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm


0
dave9996 (486)
5/9/2007 2:14:51 PM
"Tom Serface" <tom.nospam@camaswood.com> wrote in message 
news:5F02E287-1503-4560-B941-FD97DA12BC78@microsoft.com...

>I use ternaries all the time.  They use even less screen space and I find 
>them very easy to read.  I like the first form in this case since 'i' isn't 
>a boolean type,

I long ago became happy that all things which can be zero or otherwise are 
boolean types - or at least have a boolean attribute :-)

But this does not stop me defining

#define TRUTH(x)  ((x)? TRUE: FALSE )
#define truth(x)        ((x)? true: false )

:-)

Dave
-- 
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm

0
dave9996 (486)
5/9/2007 4:09:14 PM
Idiomatic English is bad enough, but Illiterate English (spoken by far too much of the
population) is profoundly unintelligible, sometimes even to native English speakers.
Pittsburgh is noted for its own local jargon, largely unintelligible to visitors from
anywhere else in the U.S.  A common Pittsburgh contraction is to drop the "to be" in
passive voice
	the windows need washed
instead of
	the windows need to be washed

OTOH, "zu dem" => "zum" and that set of rules usually confuses people learning German, and
the idiomatic speech of Germany can be quite unintelligible to someone who didn't grow up
there.  And I was completely confused in Bavaria, which has a different set of
pronounciations from, say Berlin (or American textbooks!)

American English has a huge number of bizarre grammatical constructs in common use that
make grade-school English teachers either apoplectic, or, for the more sensitive ones,
simply cause them to faint dead away.  Of course, we'd never actually TEACH these to
someone wanting to learn the language, but they are genuine artifacts of the language as
spoken by a significant number of people.

Perhaps the worst of these was the Pennsylvania license plate that read
	You've got a friend in
	  <number here>
	Pennsylvania

which outraged the entire English-language teaching community (my plate read
	You've got a friend in
	        FLNDR
and you can see a photo of it somewhere on my personal Web section.)

There are a particularly horrible set of programming idioms in common use, most stemming
back to K&R and the rather primitved C compiler that was available on the PDP-11.  For
example, the tendency to put some indication of the name of the structure in the field
names.  This has not been necessary since sometime in the mid-1980s but there are
programmers who still do it!  These structures affect me the way "he ain't never learned
how to swim, so he drownded" affects an English teacher.
					joe


On Wed, 9 May 2007 14:45:07 +0100, "David Webber" <dave@musical-dot-demon-dot-co.uk>
wrote:

>
>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
>news:ijqv33pi96kjm40j8hnoi78kvnm1fj4bc7@4ax.com...
>
>I agree with what you say on programming and...
>
>>....  A
>> friend of mine came from Europe and it was fascinating to watch his 
>> children (all
>> preschool) acquire English.  It was all by imitation.  When we have 
>> visited friends in
>> Europe, the children are thrilled to meet native English speakers and they 
>> try out their
>> vocabulary on us.  They are amazed and confused by idomatic English--and 
>> phrases like "I
>> gotta getta cuppa coffee" use words they never learned (the contraction of 
>> "to" or "of" to
>> a suffix "a" of the previous word).
>
>.. yes - us Europeans definitely have difficulty with "I gotta".   In my 
>language it would be "I've got to..." where this is one idiomatic usage of 
>the past tense of to "get" (We discarded the archaic version of the 
>participle - "gotten" - a long time ago).   In American it appears that a 
>new verb has arrived on the scene - "to got"  as in "I got a dog",  (with a 
>present sense of state as in "I have a dog" in place of our past tense "I've 
>got a dog"  quite different from the simple past meaning "I went and 
>acquired a dog" which it would have here).   I have heard the interrogative 
>form "Do you got a dog?"  and the negative "I don't got a dog" but not yet 
>the future tense (presumably "I gonna got a dog" which would be subtly 
>different from "I gonna get a dog" as "got" is to do with ownership and 
>"get" to do with acquisition).
>
>> Sounds are fascinating.  Most English native speakers can't get the German 
>> umlaut sounds,
>> or the sounds of Dutch (the town of "Geim" sounds like a throat problem),
>
>That is pure laziness - or fear of looking silly if you try and make the 
>right noise.  There is nothing intrinsically difficult with them.   [Here in 
>the North of England our saxon vowels are very close to German, and Scots, 
>Welsh, and Liverpudlian all have the dutch 'g' sound (or hard german 'ch').] 
>I claim to be one of the few Brits who can pronounce the Swiss German word 
>"Chaesechueechli" without spitting.  Standard German (Kaesekuchlein) and 
>Dutch are for amateurs by comparison :-)
>
>>or sounds of
>> non-IndoEuropean languages like Finnish or Hungarian.  I once worked with 
>> a Finn whose
>> name was obviously simple to pronounce, until he told me that was his 
>> English name.  I
>> could not reproduce the sounds he gave for his Finnish name (which is 
>> spelled the same way
>> as his English name, using the exact same letters).
>
>I never found Finnish difficult to pronounce.  You just have to remember to 
>pronounce the double consonants.  Once my mate Jaakko had explained that the 
>k's were like in bookkeeper, then there was no problem.   The structure of 
>the language itself is a different matter!
>
>> We were visiting a friend in Holland,
>> and asked for him by name.  Nobody at the reception desk knew who we were 
>> asking for until
>> we wrote it down, and they said, "Oh, ***********" (some incomprehensible 
>> sounds) and
>> called him immediately!
>
>Again dutch vowel sounds have their own logic.   "ou" is pronounced like ou 
>in "out";  "ui" is pronounced like the "ou" in "out" is pronounced by a 
>resident of Wigan (who will be puzzled by the first one).   :-)
>
>> I have been accused of speaking German with a Czech accent; my college 
>> German teacher was
>> a Czech immigrant, and I imitate her accent (imagine a native German 
>> speaker learning
>> English from someone from deep Alabama and you get the idea).
>
>I have been accused of speaking it with a Swiss accent - I learnt it when 
>lived in Zurich in the 1970s.
>
>> We are incredibly flexible creatures.
>
>And our strength is, as you say, learning by imitation.   Adults have to 
>transcend the idea that they might look stupid doing it: children learn 
>faster as they have no such handicap :-)
>
>Always run before you can walk:   just get used to the idea that falling 
>over is an integral part of the process of learning.
>
>Dave
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
5/9/2007 7:08:05 PM
I remember a consulting trip to Germany, where I was talking to someone about the "eye-sa"
bus, and he was very confused.  Of course in German,  ISA is pronounced "eesa" and "EISA"
is pronounced "eye-sa"....We finally realized we were talking about the same bus!
				joe

On Wed, 9 May 2007 15:14:51 +0100, "David Webber" <dave@musical-dot-demon-dot-co.uk>
wrote:

>
>"Tom Serface" <tom.nospam@camaswood.com> wrote in message 
>news:AB212B51-0566-4812-BA64-85CD2432906A@microsoft.com...
>
>> To be fair, I didn't claim Einstein as a native.  I just said he was 
>> "here" Like me he probably had little choice over the spelling of his name
>
>Of course the rule only ever applied if the vowel is pronounced ee, and it 
>works even more strong ly in German where ie is pronounced that way and ei 
>is prononced as in Einstein.
>
>I suppose he could have become Mr Onestone without actually changing his 
>name.   And rather than pronouncing it all wrong Mr Bernstein could have 
>become Mr Amber.  :-(
>
>Dave
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
5/9/2007 7:10:53 PM
This was translation rather than pronunciation, admirably performed by one 
of those on-line search and translation sites during a previous millennium. 
Three common kinds of disk drives were IDE, OATH, and SCSI.


"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:p17443ttci4suq1apjateiu9i151l87a1o@4ax.com...
>I remember a consulting trip to Germany, where I was talking to someone 
>about the "eye-sa"
> bus, and he was very confused.  Of course in German,  ISA is pronounced 
> "eesa" and "EISA"
> is pronounced "eye-sa"....We finally realized we were talking about the 
> same bus!
> joe
>
> On Wed, 9 May 2007 15:14:51 +0100, "David Webber" 
> <dave@musical-dot-demon-dot-co.uk>
> wrote:
>
>>
>>"Tom Serface" <tom.nospam@camaswood.com> wrote in message
>>news:AB212B51-0566-4812-BA64-85CD2432906A@microsoft.com...
>>
>>> To be fair, I didn't claim Einstein as a native.  I just said he was
>>> "here" Like me he probably had little choice over the spelling of his 
>>> name
>>
>>Of course the rule only ever applied if the vowel is pronounced ee, and it
>>works even more strong ly in German where ie is pronounced that way and ei
>>is prononced as in Einstein.
>>
>>I suppose he could have become Mr Onestone without actually changing his
>>name.   And rather than pronouncing it all wrong Mr Bernstein could have
>>become Mr Amber.  :-(
>>
>>Dave
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm 

0
ndiamond1 (258)
5/10/2007 12:45:31 AM
> Remember: De gustibus non disputandum est.
    "you cannot discuss tastes"
My answer to this is usually:
    "no, but you can pitty them"
:-)


-- 
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
0
5/10/2007 5:20:33 AM
> That is pure laziness - or fear of looking silly if you try and make the 
> right noise.

There are experiments showing that the child before a certain age gets some
kind of "inprint" of the language of the parrents.
And starts filtering out sounds that are not part of that language.

You can "fix" that later, but it can be difficult.

Other examples: Japanese cannot differentiate and R L, there are several 
"harsh" sounds in Dutch and Arabic that non-natives find hard to
differentiate, there are 6 "click" sounds in the Khoisan family of African
languages (and I bet you cannot hear them all), and then you can have up to
7 tones in some Chinese dialects. I can hear 3, maybe 4.

It is all about easly exposure, practice, some talent.
But it is certain that for some people after a certain age is not possible
to make the difference.

So it is not about laziness.


-- 
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
0
5/10/2007 5:44:28 AM
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:vc64431n1lj2vuku9b5a1lumq468m246k9@4ax.com...

>...
> Pittsburgh is noted for its own local jargon, largely unintelligible to 
> visitors from
> anywhere else in the U.S.  A common Pittsburgh contraction is to drop the 
> "to be" in
> passive voice
> the windows need washed
> instead of
> the windows need to be washed

It's an oddity that our small island has a much wider variety of Englishes 
than the enormous USA and we have a lot of strange dialectical idioms - 
though I must admit I didn't know that one.   A lot of it goes back to 
differences between the ancient Anglo Saxon kingdoms: Wessex, Mercia, 
Northumbria,... and the fact that printing "standardised" on the one where 
the printing press was set up, but didn't eliminate the others :-)    [Eg my 
father in law still says "up-over" for "upwards" - essentially the same as 
the modern Norwegian word and a pure viking import into Northumbria.]

The teaching of English has now matured here somewhat.  Kids are taught that 
there is nothing wrong with their dialect for communication between 
themselves, but that for success in the wider world they have to master 
Standard English and know when to use it.  [UK Standard English is slightly 
different from US Standard English of course.]   Furthermore the "Standard" 
is nothing to do with pronunciation - just grammar and vocabulary. 
("Received pronunciation" is definitely on the way out as a social 
necessity - I cringe when I hear BBC broadcasts from the 1950s.)

> OTOH, "zu dem" => "zum" and that set of rules usually confuses people 
> learning German, and
> the idiomatic speech of Germany can be quite unintelligible to someone who 
> didn't grow up
> there.  And I was completely confused in Bavaria, which has a different 
> set of
> pronounciations from, say Berlin (or American textbooks!)

Having learned German in Zurich, a Bavarian accent is easier than many for 
me :-)

> American English has a huge number of bizarre grammatical constructs in 
> common use that
> make grade-school English teachers either apoplectic, or, for the more 
> sensitive ones,
> simply cause them to faint dead away.  Of course, we'd never actually 
> TEACH these to
> someone wanting to learn the language, but they are genuine artifacts of 
> the language as
> spoken by a significant number of people.

Sometimes these days I have to concentrate to follow US films :-)

>
> There are a particularly horrible set of programming idioms in common use, 
> most stemming
> back to K&R and the rather primitved C compiler that was available on the 
> PDP-11.  For
> example, the tendency to put some indication of the name of the structure 
> in the field
> names.  This has not been necessary since sometime in the mid-1980s but 
> there are
> programmers who still do it!

I'm not sure exactly what you mean but I may be one of the guilty ones (on 
either of two scores).

1. I have never understood why MFC wizards write m_... for dialogue class 
data members, but I still do it out of habit.   It does have the advantage 
that one recognises a member variable instantly.   After a while I found 
that to be so useful that I tend to do it with my own classes but with a 
class-dependent prefix - eg

class SCORE
{
    int sc_nStaveCount;
    ....
};

but I'm not 100% consistent between different classes.    For me it makes 
debugging easier.

2. I sometimes use a class name where it is not necessary.   So with

class B : public A
{
};

In methods of B I will sometimes refer to

    A::methodOfA()

just to remind myself where it comes from.  [I use quite a lot of multiple 
inheritance and sometimes many generations of inheritance and so this is a 
useful aide memoire.]

Dave
-- 
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm











0
dave9996 (486)
5/10/2007 7:55:47 AM
"Mihai N." <nmihai_year_2000@yahoo.com> wrote in message 
news:Xns992BE75E2B513MihaiN@207.46.248.16...

> There are experiments showing that the child before a certain age gets 
> some
> kind of "inprint" of the language of the parrents.
> And starts filtering out sounds that are not part of that language.
>
> You can "fix" that later, but it can be difficult.

Yes, it needs work but it can be done.  And it is rarely exact - we all tend 
to preserve our native accent to some extent.

> But it is certain that for some people after a certain age is not possible
> to make the difference.
>
> So it is not about laziness.

Some people are more natural mimics than others - that much at least is 
true.   But I'm not sure I accept "not possible" as opposed to "difficult". 
I have seen enough people trying to speak a foreign language, with no effort 
at all to reproduce the sounds of that language, that I know in some cases 
at least that it is laziness - or maybe fear of the unknown.   But as you 
say, early exposure helps.

Dave
-- 
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm


0
dave9996 (486)
5/10/2007 8:03:23 AM
David Webber wrote:

> Of course the rule only ever applied if the vowel is pronounced ee, and 
> it works even more strong ly in German where ie is pronounced that way 
> and ei is prononced as in Einstein.
> 
> I suppose he could have become Mr Onestone without actually changing his 
> name.   And rather than pronouncing it all wrong Mr Bernstein could have 
> become Mr Amber.  :-(

Long ago, I read this (possibly true) story in a chess book:

The German chess master, Robert Mieses, was visiting the United States. 
A reporter came up to him, and asked:

Excuse me, are you Mister Meises?

To which the grandmaster shot back:

Nein, ich bin Meister Mieses!

-- 
David Wilkinson
Visual C++ MVP
0
no-reply8010 (1791)
5/10/2007 1:44:23 PM
I was dismayed on a visit to Norway when the grad students there discovered I enjoyed
puns.  They began to demonstrate Norwegian punning, which takes advantage of the fact that
Norwegian is an inflected language and the change of inflection can change the meaning of
a word.  Of course, the puns made no sense when translated to English, but they
demonstrated them in both English and Norwegian.  In some cases the inflection change was
so subtle they had to repeat the words several times before I could hear the difference.

My dismay about this was there was a whole new dimension of punning unavailable to English
speakers!
					joe

On Wed, 09 May 2007 22:44:28 -0700, "Mihai N." <nmihai_year_2000@yahoo.com> wrote:

>
>> That is pure laziness - or fear of looking silly if you try and make the 
>> right noise.
>
>There are experiments showing that the child before a certain age gets some
>kind of "inprint" of the language of the parrents.
>And starts filtering out sounds that are not part of that language.
>
>You can "fix" that later, but it can be difficult.
>
>Other examples: Japanese cannot differentiate and R L, there are several 
>"harsh" sounds in Dutch and Arabic that non-natives find hard to
>differentiate, there are 6 "click" sounds in the Khoisan family of African
>languages (and I bet you cannot hear them all), and then you can have up to
>7 tones in some Chinese dialects. I can hear 3, maybe 4.
>
>It is all about easly exposure, practice, some talent.
>But it is certain that for some people after a certain age is not possible
>to make the difference.
>
>So it is not about laziness.
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
5/10/2007 2:50:48 PM
Klaus Wirth, one of the pioneers of the field (inventor of Pascal and Modula, among his
other accomplishments), says

"In Europe, I am called by name: Nee-klaus Virth.  In America, I'm called by value,
Nickle's Worth"

(You have to be an Algol programmer to get this one...)
					joe

On Thu, 10 May 2007 08:44:23 -0500, David Wilkinson <no-reply@effisols.com> wrote:

>David Webber wrote:
>
>> Of course the rule only ever applied if the vowel is pronounced ee, and 
>> it works even more strong ly in German where ie is pronounced that way 
>> and ei is prononced as in Einstein.
>> 
>> I suppose he could have become Mr Onestone without actually changing his 
>> name.   And rather than pronouncing it all wrong Mr Bernstein could have 
>> become Mr Amber.  :-(
>
>Long ago, I read this (possibly true) story in a chess book:
>
>The German chess master, Robert Mieses, was visiting the United States. 
>A reporter came up to him, and asked:
>
>Excuse me, are you Mister Meises?
>
>To which the grandmaster shot back:
>
>Nein, ich bin Meister Mieses!
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
5/10/2007 2:57:41 PM
"Tom Serface" <tom.nospam@camaswood.com> wrote in message 
news:DC869B4F-F0AC-42D3-9593-7A49B95F572D@microsoft.com...
>I could barely ready your post... the accent was so thick.

Then I shall write more slowly so you can keep up. :-)

In my previous job the company had an office in Denver and I was fortunate 
one year to spend a fortnight there, over Thanksgiving. My British accent 
stood out rather (eg in a Subway sandwich shop as I ordered lunch), but it 
was nice to hear people say "I just love that accent!" especially the girls 
but I was already married <sigh>. I made quite a few friends outside of 
work, got invited to a couple of thanksgiving dinners including a "community 
dinner" organised by a church I visited, where we also made up food parcels 
for distribution amongst the poorer community.
It was great and over far too soon.

Les


>
> Tom
>
> "Les" <l.neilson@nospam.acecad.co.uk> wrote in message 
> news:f1pfs3$6hj$1@newsreader.cw.net...
>>I love your anecdotes Joe :-)
>>
>> When I left home (in the North East of England), to go to University (in 
>> middle England) the locals had great difficulty understanding my accent. 
>> The bus to Uni was a problem and I was often (over)charged an incorrect 
>> fare because they couldn't understand me. I had to modify my speach 
>> quickly. When I went home for Christmas my young cousin commented 
>> "Doesn't he talk funny!" For four years I did't fit in anywhere :-(
>> I wonder if I program with an accent.
>>
>> Les
>>
> 


0
5/11/2007 11:37:04 AM
Great story Les... I think I'm getting used to your accent now.  :o)

Tom

"Les" <l.neilson@nospam.acecad.co.uk> wrote in message 
news:f21khi$2ujg$1@newsreader.cw.net...
>

> In my previous job the company had an office in Denver and I was fortunate 
> one year to spend a fortnight there, over Thanksgiving. My British accent 
> stood out rather (eg in a Subway sandwich shop as I ordered lunch), but it 
> was nice to hear people say "I just love that accent!" especially the 
> girls but I was already married <sigh>. I made quite a few friends outside 
> of work, got invited to a couple of thanksgiving dinners including a 
> "community dinner" organised by a church I visited, where we also made up 
> food parcels for distribution amongst the poorer community.
> It was great and over far too soon.
>
> Les

0
tom.nospam (3240)
5/11/2007 2:02:32 PM
Reply:

Similar Artilces:

How can I get underlying range when Series Formula is longer than 255 characters?
I am trying to write a macro that will navigate to the range that a series represents. I do this by parsing Series.Formula. however, if the Series.formula is longer than 255 chars, it gets truncated. Is there any way to get the range in a situation like this? Here is some code that generates a problem chart: Sub CreateChartWithTrickyFormula() ' ' Macro2 Macro ' Macro recorded 12/4/2007 by saldanha ' Range("A1:A34").FormulaR1C1 = "=RAND()" Range("C1:C34").FormulaR1C1 = "=RAND()" Charts.Add ActiveChart.ChartType = xlColumn...

Which control should I use to display Unicode characters?
Hi, there, I want to show Unicode characters, such as Chinese and Arabic. Which control should I use? Could you please give me a bit of example code? Thanks a lot. Gary You do not need specific control to display Unicode strings. Normally, you would use SetWindowText function to set the control text. If you look in winuser.h file this 'function' #defined as SetWindowTextA or SetWindowTextW (depending on the type of the build). If you want to use Unicode text regardless of build type, specify SetWindowTextW explicitly. Note that you need to have appropriate fonts installed to a...

deleting characters from beginning of call
is it possible to highlight multiple cells and delete characters from the beginning of them? Hi, do you have an example ?, if you want to delete let' say " you can do just find and replace , find what ", replace with do not enter anything and clidk on replace "fazz" wrote: > is it possible to highlight multiple cells and delete characters from the > beginning of them? "fazz" wrote: > is it possible to highlight multiple cells and delete characters from the > beginning of them? Can you give an example of some of the da...

unicode application
hi, Priyanka here, this is a question related to VB. i want to make the VB application unicode based. i am not able to do it right now. if anybody knows please let me know about this. ...

VERIFY and TRACE, how to implement for debug/release, unicode-aware, no warnings at lvl 4
Hi group and apologize because this isn't a pure MFC-question. I have to finish a raw win32 app written in C++. I really miss the macros TRACE and VERIFY, which I tend to use when writing MFC programs. I googled for "win32 verify macro" and the very first hit is for a codeproject.com project with implementations to be used in a win32 program, however. The project contains a single header file, debug.h, but it doesn't compile without warnings (using warning level 4), doesn't seem to be unicode aware and doesn't compile at all in release mode. I was just wonderin...

Unicode
I want to make an application for international use which should all languages(which unicode support). So i want to know how to change language? or in ther words, how to change my Locale( at run time). ...

How to convert to unicode in ADSI
Hi all, I made a vbs to add an extra e-maill address to a distribution list group. The e-mail address should be <group name>@dnv.com. As we are a Norwegian company, the group name sometimes contains Norwegian character such as "Ø". When I look into ADSI, the string with "Ø" do updates in "mail" attribute. But if I want to send e-mail to this distribution goup, error will report that "The format of the e-mail address is incorrect". I found if I manually create the e-mail address, the system will automatically convert ...

Criteria if 1st Character might be a space
I have set up a query that accepts input from a text box. It appears some of the data in the criteria field be start with a space and some do not. I tried to concatenate a space " " & [Forms]![Form1].[Form]![Text1], but of course that only works if there is a space. What is the syntax to find a record if this field does or does not have a leading space? Like " *" should do the trick for you. If this will be run in VBA, use " %" instead. -- hth, SusanV "JoeA2006" <JoeA2006@discussions.microsoft.com> wrote in message news:1FB2F479-0946-4...

ftpd unicode
In Wince 5.0 file and folder names may contain UNICODE (e.g. cyrillic or chinese)characters. I was not able to transfer such files via FTP. I think it is a problem of ftpd. Any suggestions ? Tank you You've got full source code of FTPD, so clone it (see my blog) and change it to whatever you need, or buy a 3rd party FTP implementation for CE. Note that FTPD is shipped as "Sample" meaning it's not a full featured final program. Good luck, Michel Verhagen, eMVP Check out my blog: http://GuruCE.com/blog GuruCE Microsoft Embedded Partner http://...

Clipboard for Unicode and Non-Unicode
Hi all, We have a progarm write with non-unicode. I found that in some language, the character can not be pasted to CEdit correctly. For example, if our application is running on Russian XP, the string copy from IE can be pasted to CEdit properly. But if I pasted the same string into Notepad, and then copy the string from notepad to our CEdit, the string can not show corectly. Is it a coding problem? Is it possible to make CEdit to accept the string from notepad? Thanks, Justin If it is a question of pasting a UTF16 string into a single-byte edit control, you could try it in two stages: L...

question re international characters in e-mail message
I have my keyboard set up as US - International. For me to type the Euro symbol, I simply press CTRL + ALT + 5 and I see €. I just now responded to an e-mail where I could not enter that symbol. I created a new e-mail message and there was no problem for me to enter that symbol. Can someone else's e-mail message have a built in limitation that precludes me from responding using that symbol .... or was this a one time glitch? Thanks, Dave Horne You might have additional keyboard layouts/languages installed which doesn't support that character. See http://www.msoutlook.info/...

How do you enter Unicode characters that don't have a Alt-nnnn shortcut?
I have a need to enter a range of non-English names into a combo box on a form in an Access 2003 application. Sometimes this requires the use of accented characters that do not appear on a UK keyboard. If I refer to the Windows XP Character Map facility (charmap,.exe) then I can see that many such foreign characters have been allocated an Alt-nnnn code that is displayed at the bottom right of the Character Map acreen. This makes it easy to enter these characters. However, many other characters have not been given an Alt-nnnn keyboard shortcut. They only have a U-FFFF code, displayed at...

Invalid character in XML
Hi there, I have a 600MB xml file that I am trying to pull a small amount of data from, using an XMLTextReader in C#. All works well, until I get an exception thrown in linw 4,277,905 because of an illegal character for the encoding type. "There is an invalid character in the given encoding. Lin 4277905, position 26." Now, this file is obviously fairly large - too large for a text editor - so I was wondering two things 1) Is there a way to change the encoding type of the XmlTextReader object? (I had a quick look but it seems to be read only) 2) Is there another way to ignore...

Character code for ALT-ENTER
Hi All, I am extracting data from excel and I need to know if the data has been wrapped by setting the cell properties. I have been told that excel uses ALT-ENTER to put a soft break in a line. Can anyone tell me what character code this will equate to? TIA Peter Peter Longstaff wrote: > I have been told that excel uses ALT-ENTER to put a soft break in a line. > > Can anyone tell me what character code this will equate to? The character is still the Enter key, but it's sent to the application via WM_SYSKEYDOWN and WM_SYSCHAR messages. -- Regards, Tobias Tobias G�ntne...

Opening CSV file(saved in unicode) in excel
Hi, If anyone can help me on this, I would really appreciate that. I have a file that is saved in .csv extension (Unicode format). Let's say for example, I have the data as follows: "text1","text2",123,"text3",450.00 When I save the above data in .csv (in Ascii format) and open in excel file, I see that each value is placed in adjacent columns. When I save the same data in .csv (Unicode) I see the whole information appears in the single cell(first cell only). Is there a limitation to the CSV FILE opening in EXCEL, with Unicode format? Any inputs/...

unicode format files for Outlook 2002
I use Outlook 2002. I would like to use Unicode files (for larger size). I see references to using it with Outlook 2003, but none for 2002. can unicode files be used with Outlook 2002? If so, how? thanks, Huck No OL 2003 & 2007 only "Huck Rorick" <huckrorick@groundwork.org> wrote in message news:epYUYAl4IHA.2348@TK2MSFTNGP06.phx.gbl... >I use Outlook 2002. I would like to use Unicode files (for larger size). >I see references to using it with Outlook 2003, but none for 2002. can >unicode files be used with Outlook 2002? If so, how? > > than...

Telnet to SMTP results in garbage characters, but only from other WAN sites???
We have two RG connectors (one each direction) connecting two RG's together. The two offices are physically connected via VPN WAN link. RG A can email RG B, but email from RG B to RG A is stuck in the RG connector queue. Eventually the mail will go through, after 10 minutes or so, but it sits there for a while in the queue. While trying to diagnose the problem I found that from within RG A, if I telnet to the local Exchange server, it works fine. From any other WAN site, if I telnet to the Exchange server in RG A, I get garbage characters instead of the SMTP banner at the top of th...

Unicode problem
Given the following code snippet: WNetOpenEnum( dwScope, 0, 0, NULL, &hEnum ); struct hostent *host; DWORD Count = 0xFFFFFFFF; LPVOID Buffer = new char[16384]; DWORD BufferSize = 16384; WNetEnumResource(hEnum, &Count, Buffer, &BufferSize); NetResource = (NETRESOURCE *) Buffer; for (int i = 0; i < Count; i++, NetResource++) { CString strFullName = NetResource->lpRemoteName; ... host = gethostbyname((LPCTSTR) strFullName); } This works when I do *not* have _UNICODE and UNICODE defined. When I *do* define those directives, I get a compiler error on the call to the...

printing UNICODE and convert CString to UNICODE
1.how do i convert some CString to UNICODE ? ? ? i search in MSDN and i dont understand how to do it . 2. i writing some program and i need to send some CString to printing . in my CString there is some local language (not eanglish) and the printer always give me some GIBRISH data. pleace , someone can help me ?? ? tanks. For 1: Use MultiByteToWideChar() Or, Use a CStringW and initialise it from your CString. For 2: You will need to give more information about how you are getting your text to the printer. You should be getting a device context for the printer and use DrawText or a ...

Max number of characters in a cell
Is it possible to have more than 1024 characters in a cell? I have tried to use char(10) and char(13) however while the formula allows me to copy and paste more than 1024 characters it limits my statements to 100 characters after 1024. Is there any way to go around this and be able to have as many characters as one wish in a cell. Thanks You might search on "limits" in Excel help for this and other limits. A cell can hold a text entry of a max of 32k characters. A formula can have about 1000 characters. -- Jim "Dajana" <Dajana@discussions.microsoft.com>...

create csv which contains unicode
i want to create csv which contains unicode can anyone help me out Requirement is not clear. Use Excel to create the unicode content and then save as CSV or Unicode txt format. "archana" wrote: > i want to create csv which contains unicode > can anyone help me out ...

Unicode Support
Is there a way to insert characters in Microsoft Office V.X Applications, such as Unicode 010D and 0117 (c with a caron above it and e with a dot above it)? They don't seem to appear in the Insert -> Symbol box, and I can't insert them from the OSX Character Palette. Thanks for your help! Dave Feucht Dave Feucht <davidf@cs.pdx.edu> wrote: HI Dave, > Is there a way to insert characters in Microsoft Office V.X > Applications, such as Unicode 010D and 0117 (c with a caron above it > and e with a dot above it)? They don't seem to appear in the Insert &g...

User ID more than 15 characters
Some customers manage user ID like are named in active directory... Great Plains only accept 15 char max. -- Evelin. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?mid=4e13...

trying to export .aba file from Palm Desktop to .csv file and having problems with irregular characters
I'm getting these odd square characters in my notes section of the .csv file which I think are carriage returns in palm desktop that are unrecognizable to excel. Any idea how to eliminate them? Here's a pic of what they look like" http://img176.imageshack.us/my.php?image=howtoeliminatesquareseu6.jpg > I'm getting these odd square characters in my notes section of > the .csv file which I think are carriage returns in palm desktop that > are unrecognizable to excel. Any idea how to eliminate them? > Here's a pic of what they look like" I hate to ask what...

Handling UNICODE #2
Hello, again Here is another problem (at least for me). In the edit control non-English string is displayed properly. There is a member variable for this control, of a CString data type. My question is - how to assign this non-English string to this variable? I mean when I'm calling UpdateData(TRUE), in Debug the value for this member data is "??????" and also when I'm reading recordset, which returns this non-English value properly, (I can see it running corresponding stored procedure in Query Analyzer), the variable of a type _bstr_t, which receiving the value also look...