[PD] split number into digits
claude at mathr.co.uk
Sun Jan 17 20:05:39 CET 2021
On 17/01/2021 18:15, Antoine Rousseau wrote:
> - transform "float 512" into "symbol 512" using [makefilename %d]
I would not recommend this, because symbols stick around forever and Pd
gets slower the more symbols there are. AKA "symbol table pollution".
Instead, better to use [mod 10] to get the least significant digit, and
[div 10] to get the most significant digits (then repeat until you have
all the digits). This approach also works for bases other than 10.
More information about the Pd-list