modulus in the mod file

The basics of how to develop, test, and use models.
Post Reply
ylzang
Posts: 24
Joined: Sun Mar 08, 2015 3:38 am

modulus in the mod file

Post by ylzang » Thu Apr 12, 2018 12:37 am

Hi,
I am trying to use the built-in expression % to compute the modulus in mod file. However, there are errors for the compilation of the mod files. I have tried this expression in GUI. It works perfectly. Can anybody tell me why? Thanks.

ted
Site Admin
Posts: 5376
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: modulus in the mod file

Post by ted » Thu Apr 12, 2018 8:23 am

there are errors for the compilation of the mod files
What is the error message? What is the statement in the mod file that generates the error message?

ylzang
Posts: 24
Joined: Sun Mar 08, 2015 3:38 am

Re: modulus in the mod file

Post by ylzang » Mon Apr 16, 2018 8:18 am

syntax error:
Illegal expression:
Illegal statement:
Illegal block at line 114 in file Isinunoisy.mod
if ((t%1000)>500) {
^
make: *** [Isinunoisy.c] Error 1

The above is the error information. However, I can use % in the terminal.

ted
Site Admin
Posts: 5376
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: modulus in the mod file

Post by ted » Mon Apr 16, 2018 2:37 pm

It looks like you are working with a modification of a file called Isinunoisy.mod. The single instance of that file that exists in ModelDB may work for the purpose that its authors intended, but the modified version that you have is not going to do what you want (indeed, the original verision may cause problems for others who may try to reuse it). If you email your version to me
ted dot carnevale at yale dot edu
and tell me what you are trying to make it do, I'll see if I can fix it so that it works properly.

Post Reply