LatinUpperAlpha ( )

Function stats

Average user rating
38
234
9999
Support
FileMaker 10.0 +
Date posted
27 October 2009
Last updated
29 October 2009
Version
Recursive function
Yes

Author Info
 Daniele Raybaudi

9 functions

Average Rating 5.0

author_avatar



 

Function overview

Prototype

LatinUpperAlpha  (  )


Parameters

No parameters for this function.


Description

Tags:  Text Parsing   Sequence  

Returns a string with all 133 latin upper chars:

ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƏƠƯǍǏǑǓǕǗǙǛǺǼǾ

Needs FMP 10

Examples

Sample input

LatinUpperAlpha


Sample output

ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƏƠƯǍǏǑǓǕǗǙǛǺǼǾ

 

Function code

Let([
$cf_i = $cf_i + 1 ;
M = Mod ( $cf_i ; 2 )
];
Case(
$cf_i > 252 ; Let ( $cf_i = "" ; "" ) ;
Case (
$cf_i ≤ 26 ; Char ( 64 + $cf_i ) ;
$cf_i ≤ 49 ; Char ( 165 + $cf_i ) ;
$cf_i ≤ 56 ; Char ( 166 + $cf_i ) ;
$cf_i ≤ 111 and M ; Char ( 199 + $cf_i ) ;
$cf_i ≤ 111 and not M ; "" ;
$cf_i ≤ 127 and M ; Char ( 200 + $cf_i ) ;
$cf_i ≤ 127 and not M ; "" ;
$cf_i ≤ 174 and not M ; Char ( 202 + $cf_i ) ;
$cf_i ≤ 174 and M ; "" ;
$cf_i ≤ 179 and M ; Char ( 202 + $cf_i ) ;
$cf_i < 197 ; "" ;
$cf_i = 197 ; Char ( 202 + $cf_i ) ;
$cf_i < 214 ; "" ;
$cf_i = 214 ; Char ( 202 + $cf_i ) ;
$cf_i < 229 ; "" ;
$cf_i = 229 ; Char ( 202 + $cf_i ) ;
$cf_i ≤ 246 and M ; Char ( 230 + $cf_i ) ;
$cf_i ≤ 246 and not M ; "" ;
$cf_i ≤ 252 and not M ; Char ( 258 + $cf_i ) ;
$cf_i ≤ 252 and M ; ""
) & LatinUpperAlpha
)
)

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/234

    Prototype: LatinUpperAlpha( )
    Function Author: Daniele Raybaudi (http://www.fmfunctions.com/mid/38)
    Last updated: 29 October 2009
    Version: 1.1

*/
// ===================================

 

Comments

Daniele Raybaudi
27 October 2009



Now an acronym with accented letters can be obtained also with:

Filter ( Proper ( text ) ; LatinUpperAlpha )
  General comment
Fabrice
27 October 2009



Hi Daniele, and thank you. Very good idea!
May I suggest a couple of things?
- add a Case parameter (Upper/Lower)
- rename $i, it will surely interfere with other variables.
     Feature request
Daniele Raybaudi
27 October 2009



Hi Fabrice !

Your suggestions are truly appreciated :-)

but:

1) I'm not going to add a parameter because:
a) the calculation will need to completely change
b) what you have against Lower ( LatinUpperAlpha ) ?
c) I like CFs w/o parameters !

2) $i will surely interfere with other variables but keeps a more readibly code; which ( tiny )one do you suggest ?
  General comment
Fabrice
29 October 2009



Buona sera!

about the parameter, you're right, we can simply do Lower ( LatinUpperAlpha )

I now name the variables in my CF $cf_i for example, and I clear them at the end to leave the place clean ;)
  General comment
Daniele Raybaudi
29 October 2009



" I clear them at the end to leave the place clean ;) "

that is a must ! ( my CF has that clearing at the first Case )
and expecially when the variables is used as a counter ( like in this CF )

"$cf_i for example"

stolen ! ;-)
  General comment

 

 

 

 

 

Top Tags

Text Parsing  (33)
List  (32)
Date  (28)
XML  (26)
Format  (23)
Sql  (22)
Dev  (20)
Debug  (17)
Layout  (15)
Interface  (15)
Text  (14)
Variables  (12)
Filter  (11)
Layout Objects  (11)
Design  (10)
Array  (8)