¿ªÔÆÌåÓý

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

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


 

Integers only.? Pre-multiply your values so they stay within the valid range:

test = (240*100/300);

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.