- Posts: 13935
- Thank you received: 2551
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Expression Manager: Nested Equations?
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
11 years 2 months ago #91740
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Expression Manager: Nested Equations?
It's not a number_format (not really).
number_format(10) return 10.
But if you do :
"some text"+number_format(10) : EM test if ("some text" AND number_format(10)) are string. And seems number_format(10) are not a string.
Think EM must do this:
10+10 = 20
"some text"+10 = "some text10".
And have a solution to do:
"10"+"10"="1010"
ACtually, EM test is strval(floatval("10"))=="10" and put is numeric if yes: think there are a conceptual bug here.
Denis
number_format(10) return 10.
But if you do :
"some text"+number_format(10) : EM test if ("some text" AND number_format(10)) are string. And seems number_format(10) are not a string.
Think EM must do this:
10+10 = 20
"some text"+10 = "some text10".
And have a solution to do:
"10"+"10"="1010"
ACtually, EM test is strval(floatval("10"))=="10" and put is numeric if yes: think there are a conceptual bug here.
Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- Fred01
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 42
- Thank you received: 1
11 years 2 months ago #91770
by Fred01
Replied by Fred01 on topic Expression Manager: Nested Equations?
Thanks you guys!
A little bit off-topic, but I talked with Denis about creating a "format_money" function for EM. This would open up LimeSurvey to the wonderful world of finance. We need something that is like Excel currency masks and formatting.
Start with: -1234567.89
Turn it into: $(1,234,568) -- for example. there could be other
Currently you can write a function in EM to do this but there are a lot of steps. Especially when you can't count on number_format() even.
A little bit off-topic, but I talked with Denis about creating a "format_money" function for EM. This would open up LimeSurvey to the wonderful world of finance. We need something that is like Excel currency masks and formatting.
Start with: -1234567.89
Turn it into: $(1,234,568) -- for example. there could be other
Currently you can write a function in EM to do this but there are a lot of steps. Especially when you can't count on number_format() even.
The topic has been locked.
- Fred01
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 42
- Thank you received: 1
11 years 2 months ago #91772
by Fred01
Replied by Fred01 on topic Expression Manager: Nested Equations?
Also correction from earlier, it is not really a BUG in EM. Just a different expectation of how something will work.
Here is a pertinent quote from that PHP.net bug discussion:
[2010-01-08 23:20 UTC] rasmus@php.net
Wow, a classic case of how not to treat unpaid volunteers who provide
critical pieces of your money-making infrastructure.
Here is a pertinent quote from that PHP.net bug discussion:
[2010-01-08 23:20 UTC] rasmus@php.net
Wow, a classic case of how not to treat unpaid volunteers who provide
critical pieces of your money-making infrastructure.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
11 years 2 months ago #91787
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Expression Manager: Nested Equations?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.