The Modulo function
 
Notifications
Clear all

We appreciate the contributions many of you have been able to make towards repairing the storm damage and keeping a roof over our heads. With your help we’ve been able to complete much of the critical work. There is still work to be done to secure the house and your continued support will be a huge help.

Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.

The Modulo function

15 Posts
3 Users
2 Reactions
1,682 Views
(@tomek90b)
Active Member Registered
Joined: 1 year ago
Posts: 5
Topic starter   [#789]

Hi,

I have a problem with implement a Modulo function in the configuration file.

I tried to put in the display and function area and doesn't metter where I did it, it's still not working.

Anyone had a similar problem with this function?



   
Quote
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2101
 
TEXT=display:3 mod 2 = {{Mod(3\,2)}}

 

Things to note:

because it is an expression, it must be enclosed in double braces

the Mod function contains 2 numbers separated by a comma

however, you need to escape the comma with a backslash

 



   
ReplyQuote
(@tomek90b)
Active Member Registered
Joined: 1 year ago
Posts: 5
Topic starter  

I copied your code and see what I got in the attachment



   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2101
 

Posted by: @tomek90b
↑

I copied your code and see what I got in the attachment

Curious. What version?

 



   
ReplyQuote
(@tomek90b)
Active Member Registered
Joined: 1 year ago
Posts: 5
Topic starter  

The latest:



   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2101
 

@tomek90b post your ini file. if the forum objects then zip it then post the zip



   
ReplyQuote
(@tomek90b)
Active Member Registered
Joined: 1 year ago
Posts: 5
Topic starter  

Here you go:

 



   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2101
 

this is your ini file



   
ReplyQuote
(@tomek90b)
Active Member Registered
Joined: 1 year ago
Posts: 5
Topic starter  

So, why I see somethink like this:



   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2101
 

Posted by: @tomek90b
↑

So, why I see somethink like this:

that's the question...

 



   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2101
 

If anyone else would like to paste this into their ini file and let us know the result:

TEXT=display:3 mod 2 = {{Mod(3\,2)}}


   
ReplyQuote
(@fixit-monitor)
New Member Registered
Joined: 7 months ago
Posts: 2
 

ver 3.21.0. Also <null> 

TEXT=display:3 mod 2 = {{Mod(3\,2)}}


   
Glenn reacted
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2101
 

@fixit-monitor does your regional settings use the comma as a decimal seperator?



   
ReplyQuote
(@fixit-monitor)
New Member Registered
Joined: 7 months ago
Posts: 2
 

@glenn yes



   
Glenn reacted
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 2101
 

@fixit-monitor thanks!



   
ReplyQuote
➤ Glenn's Page