The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
I had never thought about pointer arithmetic being commutative before... seems consistent at least.
int index = 1;
char *address = "String";
index[address] is the same as *(index + address)
address[index] is the same as *(address + index)
implicitly includes the size of the base data type. (char)
If this was attempted with variables instead of constants, you might end up with memory protection issues. Most OSes would not want you to start a loop by loading memory address 1 into a register.
They would let you load the memory address of "String"
I remember being frustrated by the fact C# 1.0 had a default container called ArrayList. Is it an Array, or a List? These are very different things. Is it a fancy container that somehow has worked out how to get the benefits of both? The documentation never said.
Of course, there also were well designed CPUs[^] that had exactly 256 opcodes, with only 0x68 being reserved as prefix for future expansions of the instruction set. And of course there are the opcodes 0xE0 - 0xEF, the 'Set X Register' instruction for registers 0x0 - 0xF, short SEX. Absolutely no confusion here.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
As in, "I really really really really really really really really really want to know if it's really really really really really really really really somewhat mildly truthy."
"I intend to live forever - so far, so good." Steven Wright
"I almost had a psychic girlfriend but she left me before we met." Also Steven Wright
"I'm addicted to placebos. I could quit, but it wouldn't matter." Steven Wright yet again.
In Fortran (at least in the old days, Fortran IV and thereabouts) has no reserved words. Spaces have no significance. So you could declare a variable named INTEGER
INTEGER = 3.14
or a subroutine named FUNCTION to be invoked by
The standard loop construct is the DO loop, but
DO U BLEP RECISION IF
is not the start of a loop. Rather, you could make a comparison with the above variable
IF (IF.GT.INTEGER) ...
In my student days, there was a single course teaching Fortran. We made it a habit to solve the execizes using predefined identifiers only. Sort of like OCCC, but it took far less effort to obfuscate Fortran.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt