Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

recursive for odds and evens

Featured Replies

Hi, friends

I need a recursive function to grab odds and evens of a text(field).

Can anyone help ?

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 )

)

)

  • Author

Hi, comment

very quick as always...

So, for the evens wink.gif... 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 !!!

I suppose. But why not simply use the same function, just change the input to

Middle ( text ; 2 ; Length ( text ) - 1 ) ?

  • Author

Because if I write:

OddCharacters ( Middle ( text ; 2 ; Length ( text ) - 1 ) )

isn't so obvious as:

EvenCharacters ( text )

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? bigglasses.gif

  • 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

"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

Is that a dessert, or a main course?

I read it as "all the fish you can capture in this funky restaurant".

As long as you spell my name right...

biglaff.gif 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. blush.gif

And you get Custom Functions named after you and you don't even have a name. It just struck me funny!!! wink.gif

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. crazy.gif

LaRetta

  • 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 ?

  • Author

Hi, Michael

Brian was so kind !

Fixed...

Hi Michael blush.gif 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. crazy.gif

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! grin.gif

LaRetta

  • Author

Hi, Michael

re-fixed !

Ciao

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. smile.gif

Lee

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 wink.gif

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

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.