Forum Index Search Forum Register Log in

Runs on XP to Win 10

Current

Download 7.0

Download 7.1 Beta5 upgrade



A donation makes a contribution towards the time and effort that's going in to running this site.

Steffen

Contact:
My mail address is
at the top of the paypal form :

Your donations will help to keep this site alive and well.


Update your links !! November 2016 the forum is at www.apachelounge.com/sambar

In the forum there are links to sambarserver.info,
replace "sambarserver.info" with "apachelounge.com/sambar"
How do I determin an integer of a formula?

 
Post new topic   Reply to topic    Sambar Forum Index -> Coding & Script Corner
View previous topic :: View next topic  
Author Message
keff



Joined: 17 Aug 2005
Posts: 41
Location: Huntsville, AL

PostPosted: Wed 09 May '07 20:47    Post subject: How do I determin an integer of a formula? Reply with quote

I need to assign a variable the Integer value of a math formula in Sambar Script...I cant find that function anywhere? Can anyone help?

Keff

Example: This is what I am trying to do...it does not work.

<RC$sol1 = INT(3 * (RC$seek_month + 1) / 5)>
Back to top
View user's profile Visit poster's website
rgibson



Joined: 20 Oct 2009
Posts: 26

PostPosted: Mon 30 Nov '09 1:13    Post subject: Re: How do I determin an integer of a formula? Reply with quote

Hello Keff;
Not sure what is populating RC$seek_month but it needs to be a numeric value
<RC$myval = RC@expr((RCEmonth + 1)/ 5)>
// RCEmonth is current month ie 1-12
<RC$myint = RC@floor(RC$myval)>
<p> MYVal holds: <RC$myval><br>
<p>MYInt holds: <RC$myint><br>
<RC$oneline = RC@floor(RC@expr((RCEmonth + 1)/5))>
<p>And here it is from one line: <RC$oneline></p>

Randy



[quote="keff"]I need to assign a variable the Integer value of a math formula in Sambar Script...I cant find that function anywhere? Can anyone help?

Keff

Example: This is what I am trying to do...it does not work.

<RC$sol1 = INT(3 * (RC$seek_month + 1) / 5)>[/quote]
Back to top
View user's profile

Post new topic   Reply to topic    Sambar Forum Index -> Coding & Script Corner
Page 1 of 1