August 1, 2000

MTS Programming

Question: Should I make a call to GetObjectContext() in every function in my DLL? Obviously, you are going to do that in your “main” methods, but does calling GetObjectContext() in every function (main and helper functions) make your code more efficient? In the following example I’ve called GetObjectContext() in each

Reference to Pointers

Question: When should you use reference to pointers like those found in function arguments (class_name * & )? Answer: When you want the callee to change the pointer itself, not the object to which it points. For example, a function that allocates memory and assigns the address of the memory

Quick comparison among UDTs

When you need to compare two User Defined Type (UDT) variables to check whether they are equal, the only approach that you can follow in plain VB is to compare each individual element of the UDT. For example, say that you have the following Type declaration: Private Type MyUDT item1

Do Templates Increase Executable Size ?

Question: Since template code is generated at compile time, it implies that there should be a separate set of code for each template objects created. Does that mean templates increase the executable size? Answer: Not necessarily. Whether templates increase the program’s size depends on how you’re actually using them in

Reserved Words

Question: Where can I find a list of reserved words in C++? Answer: Most C++ books include a list of reserved keywords. Here’s the list: asm do if return typedefauto double inline short typeidbool dynamic_cast int signed typenamebreak else long sizeof unioncase enum mutable static unsignedcatch explicit namespace static_cast usingchar

Changing the Value of Global Parameters

Question: With XSL, can I change the value of global parameters inside the templates named temp? Answer: No. Parameters and variables in XSLT, once defined, essentially are fixed for a given scope. You can create local versions of these variables, but the value of the variable will not change outside

VB Constant Declaration

Question: What does the ‘* 1’ mean in this constant declaration? Public Const gcsDelimiter As String * 1 = “|” Answer: The * in your example defines the size of that the string should be initiated to. If you were to ask for the length of the string you would

Our Top 10 Tips for Classic ASP

ur focus has always been on assisting the new ASP programmer in mastering the techniques that the pros use all the time. Thus, to help you wade through the list of tips and tricks on our site, we present you with a “Top 10 List” of what we consider to

Dynamic SQL in Oracle 8i

Oracle 8I gives developers a new feature to allow execution of native dynamic SQL. This is an alternative to the DBMS_SQL package previously required. Now developers can use dynamic SQL in their PL/SQL procedures by using the EXECUTE IMMEDIATE statement. The following syntax provides this functionality: EXECUTE IMMEDIATE

No more posts to show