How to make a "difference between" block

First, make a custom block. Set it up like this:

Screenshot 2022-03-16 11.15.44 AM

the first slot should be named "num1" and the second slot "num2"

then set up the code inside it like this:

Screenshot 2022-03-16 11.15.07 AM

The reason you need the absolute is that it would be the same as using the mod block:

We do not want negative numbers, which is what the mod block reports.

No, MOD has nothing to do with it. To see that, take a case in which the first number is much larger than the second number, e.g., 100 and 2. The correct answer is 98, but 100 mod 2 is 0.

ohh..that makes sense.

i'm new to snap! and I just suck at math in general. Please correct me if I make any slip ups in the future. I'm still learning.

That's why we're here! :~)

I'm still learning.

what a strange way to make an introduction, on this months old topic.

regardless, welcome to snap!

I'd hate to tell you this but this user's activity seems like it's just a bot or a spammer.

so what i wanted to provide our new bot / spammer a warm, friendly welcome to snap.

Why do you have to criticize everything someone says? If this keeps happening I'll just mute your profile so I don't have to listen to this nonsense.


i actually only criticize some of the things some people say, lets be realistic. and most of the time, its in reply to someone criticizing me! i just defend myself well. what also sets it off is when someone says something just to say it, rather than because they mean it. its like theres a plague, filling our language with meaningless, mindless phrases like 'i hate to say it, but...' proceeds to say thing. i catch myself doing this all the time, and adapt my style accordingly. but itll drive me crazy if i dont point out when i see other people doing it! if your back pockets sticking out, im going to tell you! and probably sarcastically, but that makes it no less of a friendly gesture, essentially.

Nevermind. I'm just going to stop talking.

so you say...