moose-mousse - Electronic Moose
Electronic Moose

Helloooo! I am Moose! They/Them/He/Him I am a embedded software engineer with autism, depression and anxiaty ( Wooo! ). I post about... whatever I want... software things, mental health things... whatever I feel like Feel very wellcome to send me asks about... anything that strikes your fancy :3

266 posts

Fun Fact, Those Two Methods Are NOT Just Different Syntax For The Same Thing.

Fun fact, those two methods are NOT just different syntax for the same thing.

"If" Checks a condition. It compares it with something else. If you have a chain of many if/if else/if else /if else statments, the last one will only check its condition AFTER all the others have done so and failed. The if statements further down will be run with a delay compared to the ones further up. Only small, but real.

A switchcase runs every option with the same delay. No matter how many there are.

Because it uses its input, together with a constant, to get the correct memory place where the instructions are stored for the case, and jumps there.

It works by the compiler placing all the options in predictable memory so this method work.

So the swirch case does not compare its input to anything, it turns it into an address and goes there.

So the delay on every case is the same.

This can be important, if you are using the current time to measure time down to the micro or nanosecond, which is quite normal to want when you work with embedded systems :D

But rarely when working with higher level languages!

Its neat!

You Know You Wanna Use It So Why Dont You?

You know you wanna use it… So why don’t you?

  • lavender-flowerrrr
    lavender-flowerrrr liked this · 11 months ago
  • xochitlthetransfem
    xochitlthetransfem liked this · 1 year ago
  • thetrashman43
    thetrashman43 liked this · 1 year ago
  • eheu-vae-mihi
    eheu-vae-mihi liked this · 1 year ago
  • admitit
    admitit liked this · 1 year ago
  • devleader
    devleader liked this · 1 year ago
  • frog707
    frog707 liked this · 1 year ago
  • sickacademia
    sickacademia reblogged this · 1 year ago
  • sickacademia
    sickacademia liked this · 1 year ago
  • thatgeek42
    thatgeek42 reblogged this · 1 year ago
  • moose-mousse
    moose-mousse reblogged this · 1 year ago
  • moose-mousse
    moose-mousse liked this · 1 year ago
  • uvraiyes
    uvraiyes liked this · 1 year ago

More Posts from Moose-mousse

1 year ago

That is what experience is :3

Traveling in time to tell yourself the solution

Travelling back in time to tell myself that sticking with Lua and Love2D was the solution


Tags :
1 year ago

"programmers and computer scientists are all trans women" is not true. the truth, from experience, is that if you go into a coding or computer science class there will be maybe one closeted or stealth trans woman surrounded by the worst men you will ever possibly meet.

1 year ago

My boss: "So Moose, can you use the release toolchain to generate me a .hex file to run tests on?"

Moose, after several hours of trying: "No.

I mean it is theoretically possible... I JUST need to change the correct variables... but since our toolchain is an excel spreadsheet with buttons that activates visual basic macroes that calls chains of .bat scripts, which works with Rensas compilers and... Ruby... for some reason... and have 0 documentation...I have no freaking clue what anything does or where I need to change what..."


Tags :
1 year ago

So probably this is old news for most of us on Tumblr, but binary gender is deprecated:

So Probably This Is Old News For Most Of Us On Tumblr, But Binary Gender Is Deprecated:

Tags :
1 year ago