devxlogo

August 14, 1999

Sort Using a JavaScript Array

Javascript Arrays are quite versatile. One of its built-in features is the sort method. When an array is populated, you can simply call the sort method to sort by text.

Build Select Box Options Easily

Each time I work on a Web project, there is a page or two where I have to build a select box control where the options are derived from some

What are Aggregates?

The term “aggregate” is used in the ANSI standard to denote an array or a class with no constructors, no private or protected data members, no base classes, and no

The Memory Alignment of a Union

In C and C++, a union is aligned according to the alignment requirements of its largest member. For example: union U{ char c; short s; int i;}; The union U

Understanding What Memory Alignment Means

Most CPUs require that objects and variables reside at particular offsets in the system’s memory. For example, 32-bit processors require a 4-byte integer to reside at a memory address that

When Can a void-Cast be Useful?

Stringent compilers issue a warning message when a function’s return value is ignored. For example: int func(){ return 0;}int main(){ func(); //return value ignored} Indeed, ignoring a function’s return value

Alternative Representations of C++ Operators

C++ defines textual representations for logical operators. Platforms and hardware equipment that do not support all the special characters used as logical operators can use these alternative representations. The alternative