04-16-2021 06:58 PM
@Ben wrote:
Type cast
I was just starting some ....and poof .John Crapper shows up
For those of you Googling now, mr. Crapper invented the flush toilet.
04-19-2021 11:02 AM
04-20-2021 02:05 PM
Getting the bits from an integer seems to require a lot of code. I am sure there is a one-liner solution 😄
04-21-2021 04:19 AM - edited 04-21-2021 04:40 AM
Not quite a one liner but one Boolean AND per boolean output would work perfectly. Alternatively you could convert it in an array of booleans and then use Index Array, but I'm not so fond of that solution as it is damn easy to mix up the indices, kind of difficult to verify (counting Index Array terminals and translating them to bit position and back is always a chore, error prone and needs to be done every time again when you want to debug and verify the code) and not really less work. The solution with translating it then to a cluster as suggested by cbutcher avoids some of those problems but only if you don't have to many "holes" in the booleans.
And if I program for FPGA, the Boolean AND is definitely THE solution. Anything else will tend to use more resources.
04-21-2021 04:26 AM
04-21-2021 11:01 AM
@cbutcher wrote:
Perhaps to Bool Arr and then Array to Cluster with the appropriately ordered fields?
Yes, that was my one-liner idea. I actually made a draft yesterday but did not post it.
05-05-2021 01:08 AM - edited 05-05-2021 01:08 AM
05-05-2021 01:12 AM
05-05-2021 03:09 AM
@thols wrote:
Hmm, how do I get the array size. Like this I guess:
The for loop is ridiculous of course.
The array to cluster + unbundle has the advantage of being 'vertically friendly'.
It might grow on me 😊.
(Note that I do not need this a lot)
05-05-2021 03:31 PM
wiebe@CARYA wrote:
@thols wrote:
Hmm, how do I get the array size. Like this I guess:
The for loop is ridiculous of course.
The array to cluster + unbundle has the advantage of being 'vertically friendly'.
It might grow on me 😊.
(Note that I do not need this a lot)
Bah! If that's what you're going for, don't RG it. Just make a malliable VI 🙂