Integer part

Use this forum to post Vensim related questions.
Post Reply
msc87
Junior Member
Posts: 9
Joined: Tue Jan 05, 2010 11:55 am

Integer part

Post by msc87 »

Hi
How can i have the integer parts of number? considering that i am using PLE version.

[2.4]= 2

TNX
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

Is the INTEGER function available to you?
msc87
Junior Member
Posts: 9
Joined: Tue Jan 05, 2010 11:55 am

Post by msc87 »

yes, it is.
but what i want is not exactly the integer part of number . I need the floor, bracket or whatever it is called.

[2.4]=2
[-2.4]=-3
Lee Jones

Post by Lee Jones »

Probably not very elegant but try;

integer(value)-if then else(value<0,1,0)
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

You could make Lee's solution into a simple macro as well.
Post Reply