Cocoa (
momijizukamori) wrote2014-11-03 03:47 pm
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
A Programming-related Request...
Because I know I have some people on my subscriber list who do non-Perl programming! Does anyone have any good resources for practicing bitwise operators, octal and hexadecimal math, and/or conversions between different types of int (short vs long, signed vs unsigned). I screwed that section of my last C programming exam up massively because Perl doesn't even make you declare int vs double, and Java doesn't get into different int types.
no subject
no subject
Urgh, that must have been a nightmare. And that sort of thing is... why this stuff is on the exam, I realize, even if it gives me a headache. Perl made me so lazy....
no subject
and yes, it was a small nightmare. I was converting from an older function that used uint8 everywhere, and thought i'd gotten them all. CLEARLY NOT, AHAHAHA.
no subject
Basically. You don't even have to declare datatype, just structure (scalar/array/hash) and there's implicit conversions - if you try to use an array as a scalar, it's equal to the length of the array, etc. Basically Perl is for programmers who are lazy and also like to live dangerously
In comparison I've had to write a string-length function for at least two projects in this class so far, because it's not in the C core, and we weren't allowed to use the string library
no subject
#include
on a system wheresizeof (void *) > sizeof (int)
. Better, it just happened to work most of the time unless you turned on address space layout randomization for improved security.(I considered using my "programming" icon just for the irony....)