¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Question: Can SIMPL+ deal with not-round/exact (with a decimal point) numbers?


 

An integer does not have a decimal value.? Best bet would be to use div/mods and scale from there.


On Thu, May 9, 2019 at 1:59 PM lucasway89@... [Crestron] <Crestron@...> wrote:
?

Is SIMPL+ actually capable of handling non-round/exact numbers? Particularly when it comes to arithmetic.

Very basic example:

{
integer test, test2;

test = (240/300);
test2 = (240/300) * 100;

trace("%u", test);
trace("%u", test2);
}

So 'test' should trace 0.8, and 'test2' should trace 80, and yet both just trace 0.

I've tried this with signed and unsigned arithmetic, but the numbers aren't negative so signed shouldn't be required right?

Am I missing something?

Join [email protected] to automatically receive all group messages.