How to Find Number of Items in an Input

Let's say I have a block that looks like this:

Input a and input b are input lists.
I want to find how many items are in each input, for example:

Untitled script pic (1)

Input a has 2 items, input b has 1 item, input c has 1 item, input 1 has 1 item, and so on.
I want to get a list that looks like this:

Untitled script pic (2)

Is this possible?


Won't that work?

How would you do that outside of the block definition?

The only way is by splitting by block, and getting the data that way.

If you're asking about the variadic inputs, then you're looking at a particular invocation of the block, i.e., it's running currently. You're looking at the invocation while it's happening. So that block can construct the list and pass it as input to the procedure you want to look at it.

How is that supposed to tell me how many items there are in a single input if all the inputs are jumbled together?

I don't want to have to run the block. I just want a reporter that tells me how many items are in a variadic input.

I'm not entirely sure actually, but one thing is for sure, there's no other way, except by running the block.

Then how does @scratchmodification's reverse codification project do it? I'm trying to build a very lightweight version of their project.

I don't know, maybe you should look into it.

I've already tried, but I can't make heads or tails of this project.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.