-
Dividing Integers (& Casting Precedance)
Quiz: What does the following code print: int i,j; float k; i = 5; j = 2; k = i/j; printf(“%f\n”,k);
-
Conditional Assignments
Sometimes, you’ll have a scenario with two variables, and you need to use one of them based on a simple test. Rather than a long and awkward if / else statement, C allows the use of the ? : form. It is perfectly acceptable to write: int i,j,k,l; … i = (j > 5? k […]
-
Preprocessor #s, ##s, and other weird stuff
In the post on strings for enums , I used two types of pound symbols in the preprocessor macros: # and ##. Here’s some more detail:
-
Pnei Kedem Kite Festival
Yesterday, we went to the Kite Festival in Pnei Kedem. Overlooking (in the distance) the Dead Sea, Pnei Kedem is a small (about 20 families, IIRC) yishuv adjacent to Metzad, in Gush Etzion (our “friends” at Piece Now have a beautiful picture of Pnei Kedem… who said they don’t do any good?). Every year (for […]
-
Site Moved (Again)
We’ve moved servers again! The DNS propogation is not yet complete, so if you get weird errors, try accessing http://64.21.48.171/ instead of http://mikeage.net/. I think, however, that I have the proper .htaccess file to handle all of those automatically, though. I’m still with site5.com, and I’m going to be posting a review of their service […]