Scientific RPN Calculator (with ATTINY85)
|
03-23-2018, 07:30 AM
Post: #43
|
|||
|
|||
RE: Scientific RPN Calculator (with ATTINY85)
Drop the memmove, the union does this for you.
You might get away this this ugly: Code: byte n = sizeof(double); This should be equivalent: Code: byte n = sizeof(double); Although, personally I'd do: Code: for (byte n=0; n<sizeof(double); n++) EEPROM.write(addr++, ((byte *)&x)[n]); or even: Code:
A reasonable compiler would treat them all the same but not every compiler is reasonable. Pauli |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)