PDA

View Full Version : Solved: Is there a complete list of true type variable declarations



sandam
02-18-2005, 06:04 AM
I'm just curious because I found a few in the Word VBA library but not for all the data types I'm using (specifically byte and boolean). because I figure it will make the code run more efficiently. I've replaced as string with $ and as integer with % and it works for function calls and arrays of data types which is cool.

:banghead:

zilpher
02-20-2005, 10:04 AM
Byte and Boolean don't have a type declaration character.

It's also no more efficient to use type declaration characters, except in typing effort, yet this is minimal. There was a view a little while ago that type declaration characters would be unsupported in VB7 (.Net) but that hasn't happened yet.

It is not considered good practice to use type declaration characters, don't ask me why. My personal preference is to not use them.

A full list: http://support.microsoft.com/?kbid=191713

HTH

TonyJollans
02-20-2005, 10:37 AM
I think the main reason for it being considered bad form is that it lacks clarity. Most people don't know the characters (they probably know $, and maybe guess that # is a number but not know which type; after that they come unstuck). The concept belongs to yesterday.