var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Determining whether data is an int or a float
This is probably a dumb question with an easy solution, but I've thought and googled and scoured and come up with nothing that worked.
I have to determine whether the result of an equation is an "integer" (as stated in the requirements) or not, i.e. if the answer is 1, 2, 10, etc. (is an integer) as opposed to 1.87 (not an integer).
I'm not sure how to proceed; can someone point me in the right direction?
If you are using numeric or float datatypes, you can use the FLOOR() function to return just the integer portion of the result. Then you can use'
if (floor(@result) = @result)
-- It's an integer
-- it's a float