Splitting a Decimal Value

For whatever reason, it’s your desire to split a real number into its integer and fractional parts. Perhaps you’re angry with the value. Regardless, I can think of a few ways to perform this feat, but need not exercise a single brain cell in this effort as the modf() function performs the task automagically.
Continue reading

O Value! Where are You?

Finding things is an unwanted pastime for humans. “Where are the good scissors?” “Who has seen the cat?” “What happened to all my money?” These issues don’t exist for a program that dutifully locates any data tidbit without complaint. Finding the smallest needle in the largest haystack isn’t an issue for a computer.
Continue reading

Building a String

Programming language more modern than C sport great libraries of functions, or “methods.” Java has so many I doubt that a single programmer knows them all. In C, however, when a function is absent (and a lot of them are, comparably), you must code your own. Such is the case with building a string.
Continue reading