Re: Small feature request for future EU versions

new topic     » goto parent     » topic index » view thread      » older message » newer message

Derek Parnell and Juergen Luethje wrote:

[snip]

> > Have you an estimate for how frequently the operators have actually
been
> > used in this manner? I think there are two instances in the RDS
libraries,
> > the case conversion routines (BTW which only work on a limited set of
> > characters)
> 
> That's why they are useless for text written in many languages other
> than Englisch. That is strange for a product, that is intended for
> international use, especially because it is very easy to write better
case
> conversion routines.
> Case conversion routines written without using the operators in the
> manner mentioned above are also faster. That's why RDS themselves don't
> use their own library routines for case conversion, when speed is
> important (Euphoria/bin/guru.ex, Euphoria/bin/search.ex) ...

Hey, customers, get please a final function,
written as a "poem" in Euphoria.
Almost all bugs are fixed.
The last one is just a victim of art.
Let us wait for German, French, Greek, Turkish, Polish,
Tatar, Ukrainian, Mongol and other alphabets.
Mumbo Jumbo is ready.
I did not placed here 5 Russian alphabets - they act
as an old USSR torpedo on RDS MessageBoard.

global constant
alphabet_LA = "AaBbCcDdEeFfGgIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz",
alphabet_MJ = ".....place here The Great Mumbo Jumbo Alphabet...."

global function case_xx(integer c, object x, sequence alphabet)
 integer A, a
 sequence table table = repeat(0,256)
 
     for i=1 to length(alphabet) - 1 by 2 do
			 A = alphabet[i]
			 a = alphabet[i+1]
  if c then table[A] = A
		table[a] = A else
		table[A] = a
		table[a] = a end if end for
		 if atom(x) then
			if x  then
			   x
			   =
		     table[x]
			if x  then
			   x
			   =
			   x end if end if
    else for i=1 to length(x) do
			   a
			   =
			   x[i]
			if a  then
		  if table[a] then
			   x[i]
			   =
		   table[a] end if end if end for end if  
		  return x
 end function

puts(1, case_xx(1, alphabet_LA, alphabet_LA) & '\n')
puts(1, case_xx(0, alphabet_LA, alphabet_LA) & '\n')
puts(1, alphabet_LA & '\n')
puts(1, case_xx(0, 'A', alphabet_LA)& '\n')
----
puts(1, case_xx(1, alphabet_MJ, alphabet_MJ) & '\n')
puts(1, case_xx(0, alphabet_MJ, alphabet_MJ) & '\n')
puts(1, alphabet_MJ & '\n')
----
puts(1, case_xx(0, 'M', alphabet_MJ) & '\n')
puts(1, case_xx(0, 'u', alphabet_MJ) & '\n')
----
puts(1, case_xx(0, case_xx(1, alphabet_LA, alphabet_LA), alphabet_LA) &
'\n')


I'm waiting for the bug reports.
Let us finish this too long thread. Ok?

Regards,
Igor Kachan
kinz at peterlink.ru

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu