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
*/
// ===================================
Let([__LITBR__$cf_i = $cf_i + 1 ;__LITBR__M = Mod ( $cf_i ; 2 )__LITBR__];__LITBR__Case( __LITBR__$cf_i > 252 ; Let ( $cf_i = "" ; "" ) ;__LITBR__Case ( __LITBR__$cf_i ≤ 26 ; Char ( 64 + $cf_i ) ;__LITBR__$cf_i ≤ 49 ; Char ( 165 + $cf_i ) ;__LITBR__$cf_i ≤ 56 ; Char ( 166 + $cf_i ) ;__LITBR__$cf_i ≤ 111 and M ; Char ( 199 + $cf_i ) ;__LITBR__$cf_i ≤ 111 and not M ; "" ;__LITBR__$cf_i ≤ 127 and M ; Char ( 200 + $cf_i ) ;__LITBR__$cf_i ≤ 127 and not M ; "" ;__LITBR__$cf_i ≤ 174 and not M ; Char ( 202 + $cf_i ) ;__LITBR__$cf_i ≤ 174 and M ; "" ;__LITBR__$cf_i ≤ 179 and M ; Char ( 202 + $cf_i ) ;__LITBR__$cf_i < 197 ; "" ;__LITBR__$cf_i = 197 ; Char ( 202 + $cf_i ) ;__LITBR__$cf_i < 214 ; "" ;__LITBR__$cf_i = 214 ; Char ( 202 + $cf_i ) ;__LITBR__$cf_i < 229 ; "" ;__LITBR__$cf_i = 229 ; Char ( 202 + $cf_i ) ;__LITBR__$cf_i ≤ 246 and M ; Char ( 230 + $cf_i ) ;__LITBR__$cf_i ≤ 246 and not M ; "" ;__LITBR__$cf_i ≤ 252 and not M ; Char ( 258 + $cf_i ) ;__LITBR__$cf_i ≤ 252 and M ; "" __LITBR__) & LatinUpperAlpha__LITBR__)__LITBR__)__LITBR____LITBR__// ===================================__LITBR__/*__LITBR____LITBR__ This function is published on FileMaker Custom Functions__LITBR__ to check for updates and provide feedback and bug reports__LITBR__ please visit http://www.fmfunctions.com/fid/234__LITBR____LITBR__ Prototype: LatinUpperAlpha( )__LITBR__ Function Author: Daniele Raybaudi (http://www.fmfunctions.com/mid/38)__LITBR__ Last updated: 29 October 2009__LITBR__ Version: 1.1__LITBR____LITBR__*/__LITBR__// ===================================
Login or register to comment
Create a new account with fmcustomfunctions.com or login to post a comment.
Comments
26 October 2009
Filter ( Proper ( text ) ; LatinUpperAlpha )
27 October 2009
May I suggest a couple of things?
- add a Case parameter (Upper/Lower)
- rename $i, it will surely interfere with other variables.
27 October 2009
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 ?
28 October 2009
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 ;)
29 October 2009
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 ! ;-)