Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6502 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I would like to have 3 fields where one is populated with a number in feet and the 2nd is populated with inches. I would then like to concactenate those two fields and convert the Feet and Inches to just inches and populate the 3rd Field with that answer. I can't seem to get anything to work.

Thanks

Posted

Nope, not on sale but they are cheap... just like opinions. :

Seriously though, to me they make formulas much easier to read (even in the smallest of cases). YMMV.

Posted

doesn't cost anything in performance

I am not too sure about that, but that's not the point. The point is it confuses those of us who understand parentheses as a symbol for CHANGING the default order of evaluation.

Posted

BEDMAS

Meh,

Brackets, Exponents, Division, Multiplication, Addition, Subtraction

Easy way to remember (the meh is probably unecessary) :

Posted (edited)

hum... brackets, no brackets...

kind of running away from the initial subject... but can't resist...

Performance issue: my experience is that a code written in C++ or another compiled language would be optimized by the compiler, and the brackets removed if unnecessary... but in FileMaker, I don't think that there is an optimization process (but could be!), and you might be right, Michael, that they is a very little time lost in this case... but negligible in most cases.

David, I really like using the Let function, and I use it in nearly all calcs, but it's kind of difficult to post an answer that wants to be simple with the Let function... But in most complex calcs, it really optimizes things, whereas with very simple calcs, it can make things slower, but negligible in most cases.

Fundamentally, Michael is right to bring this issue up, as this is a basic notion in development. We don't put unneeded brackets in calcs in our developments, but some times, when it can make code more readable, and that there is no performance issue, it happens that brackets appear when not needed...

Søren Dyhr, we don't eat the holes in Emmental cheese, but it seems it helps selling :

Edited by Guest
Posted

I am not a performance freak, and I have often misused the Let() function in order to make the algorithm more readable. A purist will tell you that defining a variable that is only going to be used once is wasting computational power.

However, my point is that redundant parentheses do NOT make the code more readable - on the contrary. Instead of glancing this thread over and moving on, my eye stopped and my brain said "What the ..."

Posted

I was taking a stab at dry humor with the Let statement. Clearly it's overkill.

Maybe I should have posted it as a custom function?

Personally, I prefer the parentheses being debated. I think they do make the code clearer.

Posted

I too read it and thought the order was being implicitly changed! Good basic math principles should become habit not overkill or complication. If we later choose to add an evaluation to clarify a more complex calc then that is our choice and worth it. But this is no different than writing (1) + (4); it has the feeling of using one's fingers to count and it also takes longer to create.

I welcome these kinds of corrects - we all should. Parenth on sale ... cracks me up. Yeah, but only if it's a two-for-one sale. :wink2:

Posted

BEDMAS

Meh,

Brackets, Exponents, Division, Multiplication, Addition, Subtraction

Easy way to remember (the meh is probably unecessary) :

I thought you Aussies were supposed to use BODMAS

Brackets, Orders, Division, Multiplication, Addition, Subtraction? :

I like our PEDMAS (Please Excuse My Dear Aunt Sally) better. Parentheses, Exponentiation, Multiplication, Division, Addition, Subtraction)

lol.

http://en.wikipedia.org/wiki/Order_of_operations

Posted

Much ado about nothing. I'm surprised something this samll would case so much discussion (at least on comments part).

Posted

Listen or don't listen; the choice is always yours. But others might want to improve their skills and learn more elegant ways of design. Don't fault Comment for pointing it out. Again everyone - always point out better methods to me please. I will always welcome it! :wink2:

Posted

Here's a "better" method for you:

When there is more than one way of doing something don't try to pass off opinion as fact.

P.S. I didn't fault comments opinion. His/Her opinion is one I happen to respect.

Anyway... I guess I'll go back to trying to help other users and leave you to your knitting :

Posted

Hmm... I didn't think "Are parentheses on sale" was 'much ado'. But it seems there is a deeper issue here, as Francis pointed out.

Readable or not may be a matter of opinion, but in terms of accepted mathematical notation, redundant parentheses are just plain wrong - and that's a fact.

P.S. I didn't understand your "knitting" remark and I am sure you didn't intend it to sound as rude as it does.

Posted

As far as the parentheses go...we're not talking about mathematical notation. We're talking about syntax for Filemaker expressions. Different things. There's little standardization for writing FM expressions.

I'm appreciate other's opinions on the issue, but I don't agree this is a right or wrong situation. But as they say YMMV.

Posted

As far as the parentheses go...we're not talking about mathematical notation. We're talking about syntax for Filemaker expressions. Different things.

Different things? Why? If the rest of the programming world follows correct notation, why should we abandon it? That makes no sense to me.

Posted

Rules, standardisation and structure are necessary in our world, and thank god they exist... but, as my grand grand uncle always said, be wise my son !

It is wisdom is to reveal to someone his mistakes, but also is wisdom to know when to override rules, for the sake of your development and maintainability.

This makes me thing of the FileMaker Naming convention, just freshly translated to French, thank FileMaker (!!). It is standardization meant to be more a guidance than a rule... and some complain that it is not enough strict, while other that it is brings too many constrains... No perfect world, so many points of view... but what richness!!!

But don't worry Jscott, nothing of all this is your fault :

Posted

for the sake of your development and maintainability.

That's a good point - maintainability. After all, readability is not an end in itself. You want it readable so you can fix it or modify it easily.

Now, I am already having problems maintaining the parentheses that I do need, so...

Posted

If the rest of the programming world follows correct notation, why should we abandon it? That makes no sense to me.

Who's saying what you should do? I'm simply saying what I like to do. If you don't like it, or don't understand it, don't do it.

Posted

I thought you Aussies were supposed to use BODMAS

We are... but i grew up in New Zealand ... and i forget what the O stands for anyway (turns out it's "order" -- any number raised to the power of another number).

Posted

When there is more than one way of doing something don't try to pass off opinion as fact.

Hmmm...

2 = 2

1+1 = 2

4/2 = 2

16/4/2 = 2

16/2/2/2 = 2

64/2/2/2/2/2 = 2

(((((64/2)/2)/2)/2)/2) = 2

7 Ways of doing it, but I'm pretty sure it's a fact that the first option will evaluate quicker is more readable and just makes more natural sense than the others. Why do more work than you have to?

On a side note, You knit LaRetta? Wanna teach me as much about knitting as you have through your 'opinions' about how FM works? I'll be knitting sweaters in no time (good way to pick up the chicks lol) :(

Posted

Who's saying what you should do? I'm simply saying what I like to do.

If I may be blunt for a moment: I don't think personal likes and dislikes are helping anybody here.

LaRetta gave a reason for her preference. Following established notation helps other people understand what you have done, and vice versa.

It's perfectly alright for you (or anyone else) to reject this reason in favor of others - but at least you will be making an informed decision. I believe that's what this forum is all about.

Posted

While seemingly innocuous, these parentheses have sure stirred up a debate. Two little brackets, so many posts. I don't know why that is, but since I haven't expressed this as clearly as I could:

It is my opinion that using parentheses when they are not required is helpful because it is a form of commenting an expression.

The tone of the posts in this thread have not made me feel encouraged to discuss the issues of commenting or standardization. That's too bad.

Posted

when they are not required is helpful because it is a form of commenting

But how do you distinguise this from mathematical illiteracy??

--sd

Posted

The tone of the posts in this thread have not made me feel encouraged to discuss the issues of commenting or standardization. That's too bad.

Every discussion may appear right or bad...

The important thing is "growing up all together"

Posted

It's too bad for the OP that his thread got hijacked. But I this is a good discussion -- deserves its own thread.

FWIW, I'm with the non-purists on this one: too many parens. do make a calc harder to read, but I'll use them when they make a calc more readable to me.

This topic is 6502 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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