473,385 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Declaration shortcuts

danp129
323 Expert 256MB
I've been doing this for a long time in vb6 but don't see other's using it much...

Dim a! ' same as Dim a as Short
Dim b@ ' same as Dim b as Currency
Dim c# ' same as Dim c as Double
Dim d$ ' same as Dim d as String
Dim e% ' same as Dim e as Integer
Dim f& ' same as Dim f as Long
May 8 '07 #1
4 4816
vijaydiwakar
579 512MB
I've been doing this for a long time in vb6 but don't see other's using it much...

Dim a! ' same as Dim a as Short
Dim b@ ' same as Dim b as Currency
Dim c# ' same as Dim c as Double
Dim d$ ' same as Dim d as String
Dim e% ' same as Dim e as Integer
Dim f& ' same as Dim f as Long
No dear
this is a hidden aspect so every body don't know it
but I'm using it always
May 8 '07 #2
Killer42
8,435 Expert 8TB
The type declaration characters are simply the old way of declaring data types. As far as I know, the only advantage of the newer way (As Long, etc) is that they are much more straightforward to read.

I used these type characters in various versions of Basic for many years, but I can't remember most of them now (thanks for the handy reference). But there's much less chance of forgetting what "As String" means. Plus, I think that some new types such as Object, Variant and perhaps others, do not have a type declaraction character. Not too surprising, since they're only supported for backward compatibility.

It's a personal choice how you prefer to code, of course, but I would recommend using the newer method, so that others can read your code.

Oh, and by the way, VB6 doesn't have a Short data type. That would be Single.
May 8 '07 #3
danp129
323 Expert 256MB
The type declaration characters are simply the old way of declaring data types. As far as I know, the only advantage of the newer way (As Long, etc) is that they are much more straightforward to read.

I used these type characters in various versions of Basic for many years, but I can't remember most of them now (thanks for the handy reference). But there's much less chance of forgetting what "As String" means. Plus, I think that some new types such as Object, Variant and perhaps others, do not have a type declaraction character. Not too surprising, since they're only supported for backward compatibility.

It's a personal choice how you prefer to code, of course, but I would recommend using the newer method, so that others can read your code.

Oh, and by the way, VB6 doesn't have a Short data type. That would be Single.
Oops dunno why I typed short :P
May 8 '07 #4
Killer42
8,435 Expert 8TB
Oops dunno why I typed short :P
Been dabbling in other languages, have we? Traitor... ;)
May 8 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Luke Wright | last post by:
Hi, I have built a setup project to install an application I am developing. I would like to be able to prompt the user whether to install Shortcuts in the following locations: * Start Menu *...
0
by: Blake | last post by:
Hello, Does anyone know if there is any way to add a condition to your setup project so that the user can choose if they want a desktop shortcut or a program menu by selecting a checkbox. I...
0
by: DotNetJunkies User | last post by:
I am using the BrowseFolderDialog control in a Winform app to get a user selected path. Under Network Places, there are Folder Shortcuts to network resources. If a user selects one of these Folder...
4
by: blabore | last post by:
I have a MDI windows forms application that uses a toolbar on the parent form. I've also setup a context menu on this form to be used as the dropdown menu for one of the toolbar buttons. However,...
3
by: Marius Rus | last post by:
I have an application write in c# and i want to offer to the user to create himself shortcuts with icons for the main menu items. I will very much appreciate if will receive an helping hand. Thank...
0
by: GeorgeF | last post by:
How can I conditionally deploy shortcuts to my application? I have created a custom installer dialog box to give my users the option of creating desktop/start menu shortcuts, but the shortcuts do...
1
by: noleander | last post by:
Hello. Ive got a VC++ program. Inside the program Ive got some code that has a full file path: C:\aa\bb\cc\dd\file.txt One of the folders in that path (cc) is a shortcut pointing to some...
5
by: PAzevedo | last post by:
With ToolStripMenuItem objects i created a 'Tools' menu and from that menu droped an Item to which i assigned a ShortcutKey of 'Keys.Control | Keys.E', and the shortcut doesn't work. This...
331
by: Xah Lee | last post by:
http://xahlee.org/emacs/modernization.html ] The Modernization of Emacs ---------------------------------------- THE PROBLEM Emacs is a great editor. It is perhaps the most powerful and...
8
by: BD | last post by:
How can I duplicate the behavior of the operating system shortcut keys in my application? For example, my windows form has 5 controls (textboxes), the operating system will pickup which control...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.