March 9, 2000

Works in IE But Not Netscape

Question: Why do certain things like tables and frames work fine with Internet Explorer but not with Netscape? Answer: There are many differences in the way the two major browsers interpret HTML. For example, Netscape requires that HTML input controls be within an HTML tag pair. IE has no such

File Properties

Question: How can I retrieve a file’s properties? Either using an API call or a VB Control (i.e. version information)? Answer: To retrieve the file properties displayed on the property sheet of a fil, you can use the FileSystemObject (in the References dialog its Microsoft Scripting Runtime): ‘******************Dim fso As

VB and Web Development

Question: We have several applications developed in VB. What are the best alternatives for making these applications Web-enabled, and what are the advantages and problems associated with them. Answer: If you are familiar with VB and you are using Microsoft Internet Information Server then I recommend you use Active Server

Simplify DHTML Scripting With SrcElement

Browsers Targeted: Internet Explorer 4+ The SrcElement DOM object is generated any time that an event is called, and it contains the element that called the event in the first place. One of the principle advantages of using it is that you can radically simplify your DHTML scripting code by

The Standard C++ Naming Convention

If you’re looking for a “house style” of naming convention, you can adopt the one used in Standard C++. It uses all lowercase letters for identifiers, and underscores as word separators. According to this naming convention, a function that cleans a stack, for example, would be named: void clean_stack(); //

Hide Function Pointer Declarations With a typedef

Can you tell what the following declaration means? void (*p[10]) (void (*)() ); Only few programmers can tell that p is an “array of 10 pointers to a function returning void and taking a pointer to another function that returns void and takes no arguments.” The cumbersome syntax is nearly

The snprintf() Function

The C99 standard defines a new version of the function sprintf(), namely snprintf(), with the following prototype: int snprintf(char * restrict s, size_t n, const char * restrict format, …); The additional argument n (highlighted) contains the maximal number of characters that the snprintf() copies to the buffer s. If

The “Maximal Munch” Principle

Every compiler has a tokenizer, which is a component that parses a source file into distinct tokens (keywords, operators, identifiers etc.). One of the tokenizer’s rules is called “maximal munch”, which says that the tokenizer should keep reading characters from the source file until adding one more character causes the