Broadcast TRUE

Issue #107 resolved
Turgut Guneysu created an issue

Hi John,

It is possible to use:

But not possible to check for:

Not a biggie, but if the first is allowed,, it leads one to think the second should be possible.

Comments (3)

  1. John Maloney repo owner

    Dropping reporter blocks in “when received” is now disallowed. (That construct never worked since the received message has to be a string constant.)

    However, the broadcast block converts its argument to a string, so it is possible to broadcast a number or a boolean. For booleans, you need to use the strings “true” and “false” in the when received block. This is a hack and isn’t recommended practice.

    On the other hand, broadcasting and receiving numbers is fine and can be very useful. For example, you might broadcast a random number to trigger a random response from a set of “when N receive” hats for N over the random range of the random block.

  2. Log in to comment