Raybaudi Posted April 14, 2005 Share Posted April 14, 2005 Hi, friends I need a recursive function to grab odds and evens of a text(field). Can anyone help ? Link to comment Share on other sites More sharing options...
comment Posted April 14, 2005 Share Posted April 14, 2005 Do you mean a function that returns every other character in a text? If so, this one will return the odd-numbered characters (I love the name!!): // Custom Function OddCharacters ( text ) Let ( [ char = Left ( text ; 1 ) ; nextText = Middle ( text ; 3 ; Length ( text ) - 2 ) ] ; char & Case ( Length ( nextText ) ; OddCharacters ( nextText ) ) ) Link to comment Share on other sites More sharing options...
Raybaudi Posted April 14, 2005 Author Share Posted April 14, 2005 Hi, comment very quick as always... So, for the evens ... we'll use: // Custom Function EvenCharacters ( text ) Let ( [ char = Middle ( text ; 2;1 ) ; nextText = Middle ( text ; 3 ; Length ( text ) - 2 ) ] ; char & Case ( Length ( nextText ) ; EvenCharacters ( nextText ) ) ) Thank you very much !!! Link to comment Share on other sites More sharing options...
comment Posted April 14, 2005 Share Posted April 14, 2005 I suppose. But why not simply use the same function, just change the input to Middle ( text ; 2 ; Length ( text ) - 1 ) ? Link to comment Share on other sites More sharing options...
Raybaudi Posted April 15, 2005 Author Share Posted April 15, 2005 Because if I write: OddCharacters ( Middle ( text ; 2 ; Length ( text ) - 1 ) ) isn't so obvious as: EvenCharacters ( text ) Link to comment Share on other sites More sharing options...
comment Posted April 15, 2005 Share Posted April 15, 2005 Good point. And I am glad you did not consider changing the function name to CombFilter, or something. After all, how often does one get a legitimate chance to name a function OddCharacters? Link to comment Share on other sites More sharing options...
Raybaudi Posted April 15, 2005 Author Share Posted April 15, 2005 Hi comment, by the way, what is the real meaning of Odd Characters in English ? In Italian I traslate your function into : "GetDispari(testo)"[and anybody can understand that the function will give the odd characters of a text] = in italiano:[e tutti possono capire che la funzione restituir Link to comment Share on other sites More sharing options...
comment Posted April 15, 2005 Share Posted April 15, 2005 "Odd", in addition to "an integer not divisible by two, such as 1, 3, and 5", also means "strange or peculiar". "Character" also has multiple meanings, among them "a person, especially one who is peculiar or eccentric". So "odd characters" can also be understood as "a bunch of freaks". I am sorry I cannot confirm your Italian version. 'Tutti possono capire che la funzione restituir Link to comment Share on other sites More sharing options...
stanley Posted April 15, 2005 Share Posted April 15, 2005 Is that a dessert, or a main course? Link to comment Share on other sites More sharing options...
comment Posted April 15, 2005 Share Posted April 15, 2005 I read it as "all the fish you can capture in this funky restaurant". Link to comment Share on other sites More sharing options...
Raybaudi Posted April 17, 2005 Author Share Posted April 17, 2005 Hi, comment I had put yours functions in the : http://www.briandunning.com/filemaker-custom-functions/list.php because those functions are needed by my CheckCF custom function !! I hope you agree! Link to comment Share on other sites More sharing options...
comment Posted April 17, 2005 Share Posted April 17, 2005 As long as you spell my name right... Link to comment Share on other sites More sharing options...
LaRetta Posted April 17, 2005 Share Posted April 17, 2005 Uh, is that comment or Comment or Mr. Comment??? I'm not laughing at you, it's just that I'll be 104 before I get my first Custom Function named after me. I'd even allow it if my name was spelled wrong. And you get Custom Functions named after you and you don't even have a name. It just struck me funny!!! Is this the extent of my worthy input to this thread? Yep ... I guess I needed a break on a Sunday afternoon. I'm untangling spider webs (the Graph) and my brain hurts and my eyes are crossing. LaRetta Link to comment Share on other sites More sharing options...
comment Posted April 17, 2005 Share Posted April 17, 2005 You just don't know where (or how) to look... http://www.briandunning.com/filemaker-custom-functions/detail.php?fn_id=225 http://www.briandunning.com/filemaker-custom-functions/detail.php?fn_id=190 Link to comment Share on other sites More sharing options...
Raybaudi Posted April 18, 2005 Author Share Posted April 18, 2005 Hi, Michael I'm sorry that I don't writed correcty your name... I asked to Brian (by e-mail) to tell me how I can edit those functions... Do you know ? Link to comment Share on other sites More sharing options...
Raybaudi Posted April 18, 2005 Author Share Posted April 18, 2005 Hi, Michael Brian was so kind ! Fixed... Link to comment Share on other sites More sharing options...
Munchie Posted April 18, 2005 Share Posted April 18, 2005 http://babelfish.altavista.com/ gave me this: All can understand that the function restituir Link to comment Share on other sites More sharing options...
LaRetta Posted April 19, 2005 Share Posted April 19, 2005 Hi Michael thanks for the links! Actually, I'm aware of this website and I've been working my way through understanding all the Custom Functions. However, I'm only on the D's. I keep getting ideas from the CFs (as I pick them apart) and I get side-tracked and flit off into new worlds. So much to learn and so little time!! BTW, GetRGB is cool. I particularly like the way you 'explain' each piece (comment them out, smile). It translates into a CF which makes total sense to me and I learn a great deal (hopefully). I had an idea but got stuck on it and I think GetRGB might actually provide a missing piece for me. Thank you! LaRetta Link to comment Share on other sites More sharing options...
Raybaudi Posted April 19, 2005 Author Share Posted April 19, 2005 Hi, Michael re-fixed ! Ciao Link to comment Share on other sites More sharing options...
Lee Smith Posted April 19, 2005 Share Posted April 19, 2005 Hi Munchie, Thanks for the link. I'm sure it will come in handy. Now, if I can only remember I have it, when I need it. Lee Link to comment Share on other sites More sharing options...
dual_mon Posted April 21, 2005 Share Posted April 21, 2005 I don't believe he has officially announced it yet, but if you add a new function to Brian Dunning's site, you will see that he has added a password field that lets you come back and edit your submissions later. I can only assume that in the process of making this change he changed the fn_ids because absolute links to his CFs no longer return the expected result. Example: http://www.briandunning.com/filemaker-custom-functions/detail.php?fn_id=225 and http://www.briandunning.com/filemaker-custom-functions/detail.php?fn_id=190 lead to a CF by Brian Hightower and a blank function. A little deductive reasoning and the search function on his site leads me to believe that the two functions comment originally referenced above are now: http://www.briandunning.com/filemaker-custom-functions/detail.php?fn_id=203 and http://www.briandunning.com/filemaker-custom-functions/detail.php?fn_id=173 BTW, comment, FMForums *does* have a Profile feature with name fields in it PS, I am going to send Brian an email an let him know that it looks like his id numbers got shifted by minus 22 or some such, so don't change your bookmarks yet. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6966 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now