Hey guys.
I have started playing around with PD and I came up with a problem.
I want to have 8 toggles, but only one can be on at the same time. If I press button on keyboard, previously on toggle turns off and toggle which button is pressed, turns on and keeps it on until next button press.
-
Toggles to disable other toggles
-
@rjp9 woof... woof, woof "decimal" point woof!
-
@rjp9 Well, as far as I know it's just something to get used to but there are no drawbacks. Most programming languages indeed differentiate between floats and integers (Python, FORTRAN, C++, to name a few), but in the case of Pd I never found any limitation from it - it actually makes things more simple as there is a single data type for numbers.
People coming from Max (as was my case, I was a Max users for some years before moving to Pd) will see these error messages and that will look cryptic to them. But nothing that a little googling wouldn't solve
Cheers!
-
@whale-av Ah I get it now. But I still don't see what the big deal is. 5 divided by 3 is the same as 5.0000 divided by 3.0000 right?
-
@gsagostinho Ah ok. Thanks for clearing that up!
-
Yes, that's why integers are pointless unless you are playing with Lego, and even then they have "half" bricks.
David. -
Yes, that's why integers are pointless unless you are playing with Lego, and even then they have "half" bricks.
But in other programming languages they do make sense. You really don't want to mess your floating point numbers with integers, and things could get very complicated very easily. Depending on the manipulation you do, you could easily arrive at 2.999999 instead of 3.000000, and for instance when you are counting iterations of a loop that would be totally non-understandable.
-
True, but that is only because computers (without a little help) cannot recognise that 2.99999999 is in all probability 3. However, as it is possible to know the circumference of the universe to within the radius of a Hydrogen atom using PI calculated to "only" 39 decimal places, it is probable that 2.9999999 is not actually 3, and integers have no place in our universe.
Excel does tend to mess up my VAT calculations sometimes though, and that is also true!
It is amazing what fun you can sometimes have with an old post... woof.
David. -
integers have no place in our universe.
Absolutely true, but floats have no place in our concepts I mean, concepts like grouping things together (3 dogs, 5 cats and not 3.000001 dogs and 4.999999 cats), ordering, sequential things, etc. all need integers. And these are fundamental to most programming languages.
It is amazing what fun you can sometimes have with an old post... woof.
Absolutely!
-
@gsagostinho You are still wrong, 1.35067 David's = 1 Gilberto!