Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PROPER case for sentences
Message
From
05/02/1999 18:08:42
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00184375
Message ID:
00184576
Views:
16
>>
  IF lCapitalize=.T.
>>		cNewstring=cNewstring+upper(cChar)
>>		lCapitalize=.F.
>>		LOOP
>>	ENDIF
>>	IF asc(cChar)=46
>>		lCapitalize=.T.
>>	ENDIF
>>	cNewstring=cNewstring+cChar
>>ENDFOR
>>=messagebox(cNewstring)
>>
>
>Great code, but I suggest you look for !, ?, etc, besides just period.
>
>Cheers,

Another gotcha: in English and French, ordinal numbers are created by adding suffixes (-nd, -rd, -th, -eme etc); in many other languages they simply get a period, so "45. street" is equivalent to "45th street". Of course, spelling checkers aren't aware of this, so even in Word I have to take care of capitalization myself, or keep it turned on, but every time I write a year (which is pronounced as ordinal number in my language), I put the period after it, type a couple of words, get back and decapitalize the first word after the year and then quickly get the cursor the hell away from there, so this word is no more in the grammar checking zone.

So, if you're capitalizing after a period, check if the character _before_ it is a digit; if it is, don't.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform