April 14, 200520 yr Hi, friends I need a recursive function to grab odds and evens of a text(field). Can anyone help ?
April 14, 200520 yr 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 ) ) )
April 14, 200520 yr Author 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 !!!
April 14, 200520 yr I suppose. But why not simply use the same function, just change the input to Middle ( text ; 2 ; Length ( text ) - 1 ) ?
April 15, 200520 yr Author Because if I write: OddCharacters ( Middle ( text ; 2 ; Length ( text ) - 1 ) ) isn't so obvious as: EvenCharacters ( text )
April 15, 200520 yr 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?
April 15, 200520 yr Author 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
April 15, 200520 yr "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
April 17, 200520 yr Author 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!
April 17, 200520 yr 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
April 17, 200520 yr 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
April 18, 200520 yr Author 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 ?
April 18, 200520 yr http://babelfish.altavista.com/ gave me this: All can understand that the function restituir
April 19, 200520 yr 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
April 19, 200520 yr 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
April 21, 200520 yr 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.
Create an account or sign in to comment