Microsoft MakeCode

Return Help

When do I use the Return in a function? And what do I have to put in it?

1 Like

As to not start another 100-post topic, you can read this thread:

Although it is quite long so you may want to reserve some time for it. :laughing:

The gist: In math you can have functions like f(x) = x * 2. x would be a parameter and if we put in 2 for x we would get 4. That’s what the return block does, except you can return anything from a function, including sprites and strings and arrays and whatever! In the functions list there will be a circle version of any function with a return <value> block in it.

1 Like

Also! How do I make sevenseg counter relative to camera?

1 Like

:frowning: Tried using the set flag function on it, didn’t work. I would ask the creator of that extension but I don’t know who made that extension either :sweat_smile: