File Name: visual basic keywords and their meaning .zip
Data types determine the type of data that any variable can store. Variables belonging to different data types are allocated different amounts of space in the memory. There are various data types in VB. They include: Boolean : the allocated storage depends on the platform of implementation. Its value can be either True or False.
Join Stack Overflow to learn, share knowledge, and build your career. Connect and share knowledge within a single location that is structured and easy to search. Nowadays, Dim is used to define any variable, not just arrays, so its meaning is not intuitive anymore.
Of course, you may argue that if you do not declare the variables in memory where do you do it? Maybe "Declare in Module" is a good alternative considering how Dim is used.
In my opinion, "Declare In Memory" is actually a mnemonic , created to make easier to learn how to use Dim. I see "Declare in Memory" as a better meaning as it describes what it does in current versions of the language, but it is not the proper meaning. In fact, at the origins of Basic Dim was only used to declare arrays. For regular variables no keyword was used, instead their type was inferred from their name. And so, you used Dim only to give dimension to the arrays notice that ReDim resizes arrays.
Really, Does It Matter? I mean, it is a keyword it has its meaning inside an artificial language. It doesn't have to be a word in English or any other natural language.
So it could just mean whatever you want, all that matters is that it works. Anyhow, that is not completely true. As BASIC is part of our culture, and understanding why it came to be as it is - I hope - will help improve our vision of the world.
I sit in from of my computer with a desire to help preserve this little piece of our culture that seems lost, replaced by our guessing of what it was. For my disappointment, they don't say what does Dim stand for, and only say how it is used. Even though, it doesn't say what does Dim stand for, it says on page :. As I said, it doesn't say that Dim stands for dimension, but serves as proof to show that associating Dim with Dimension was a common thing at the time of writing that document.
Now, I got a rewarding surprise later on at page , the title for the section that describes the DIM keyword note: that is not listed in the contents says:.
So, I didn't get the quote "Dim stands for With renewed hope, I decided to search about how Dim was chosen. Again, I didn't find an account on the subject, still I was able to find a definitive quote:.
A part of the original BASIC compiler source code, where it would jump when finding a DIM command, in which you can clearly see the original intention for the keyword:. Later on it came to be used to declare all kinds of variables, when the possibility to specify the type for variables was added in more recent implementations.
Dimension a variable, basically you are telling the compiler that you are going to need a variable of this type at some point. Variable declaration. Initially, it was short for "dimension", which is not a term that is used in programming outside of this specific keyword to any significant degree.
Back in the day DIM reserved memory for the array and when memory was limited you had to be careful how you used it. Short for Dimension. It's a type of variable. You declare or "tell" Visual Basic that you are setting up a variable with this word.
For reference type, we have to use new keyword to create the new instance of the class or structure. Dim lblTop As New System. Dim statement can be used with out a datatype when you set Option Infer to On. In that case the compiler infers the data type of a variable from the type of its initialization expression. Example :. Learn more. Ask Question.
Asked 11 years, 8 months ago. Active 3 months ago. Viewed k times. Improve this question. Nick Katsivelos Nick Katsivelos 4, 4 4 gold badges 17 17 silver badges 11 11 bronze badges. Add a comment. Active Oldest Votes. Improve this answer. In early releases of basic the only variables that needed to be declared were arrays.
The "Dim" keyword was used to set the dimensions of this array. I remember reading a gw-basic programming guide in the early 80's and I explicitly remember it explaining DIM meaning Declare In Memory. One thing to keep in mind is that, in early language development, it was common to overload a keyword to have multiple meanings.
Since, in the original Basic, "Dim" was already a keyword used to declare array variables, the keyword was extended to include declaring all variables. Introducing a new keyword was avoided for multiple reasons, one of which is they didn't want to break existing programs who already used the new keyword as a variable name. Today we have more sophisticated parsing technologies and faster computers, we don't see those types of limitations. For instance, in later Basic, such as Visual Basic, a type and a variable could be the same name.
It means different things in different contexts. The more formal definition is on page numbered 37 or 41 in the PDF itself. Dim have had different meanings attributed to it. Even though, it doesn't say what does Dim stand for, it says on page Now, I got a rewarding surprise later on at page , the title for the section that describes the DIM keyword note: that is not listed in the contents says: DIM dimension of an array So, I didn't get the quote "Dim stands for Again, I didn't find an account on the subject, still I was able to find a definitive quote: Before you can use an array, you must define it in a DIM dimension statement.
NET ;. Theraot Theraot I've heard "declare in memory" also. Guffa Guffa k 95 95 gold badges silver badges bronze badges. JoshBerke JoshBerke 62k 23 23 gold badges silver badges bronze badges.
Robert Harvey Robert Harvey k 42 42 gold badges silver badges bronze badges. Shoban Shoban Thornton Thornton 71 1 1 silver badge 1 1 bronze badge.
MonstaP MonstaP 87 1 1 silver badge 1 1 bronze badge. AbdulAziz AbdulAziz 4, 12 12 gold badges 51 51 silver badges 75 75 bronze badges. RBT Chandralal Chandralal 2 2 gold badges 8 8 silver badges 24 24 bronze badges. Welcome to StackOverflow and thank you for this answer, but it doesn't really expand on the numerous other answers that all give the same answer. The Overflow Blog. Best practices can slow your application down.
The number of bits that can be processed or transmitted in parallel, or the number of bits used for single element in a data format. Although this term is used throughout computing and data processing as are 8-bit, bit, and similar formulations , in VB terms , this means the number of bits used to represent memory addresses. The break between bit and bit processing happened with the introduction of VB5 and OCX technology. Access Level In VB code, the ability of other code to access it that is, read it or write to it. The access level is determined both by how you declare the code and by the access level of the container of the code. If code can't access a containing element, then it can't access any of its contained elements either, no matter how they're declared.
We use procedures and functions to create modular programs. Visual Basic statements are grouped in a block enclosed by Sub , Function and matching End statements. The difference between the two is that functions return values, procedures do not. A procedure and function is a piece of code in a larger program. They perform a specific task.
In visual basic, Keywords are the predefined set of reserved words that have special meaning for the compiler. So the keywords in visual basic cannot be used as identifiers such as variable name, class name, etc. Generally, the reserved keywords will not allow us to use them as names for programming elements such as variables, class, etc. In case, if we want to bypass this restriction, we need to define the variable name in brackets . In visual basic, unreserved keywords are not reserved keywords which means we can use them as names for programming elements such as variables, class, etc. The following table lists the available unserved keywords in a visual basic programming language.
This listing of VBA functions, statements, methods and properties will be useful when creating your own macros. For each VBA keyword, Appendix D Alphabetical List of Visual Basic Keywords There are other Paste methods, with different.
And today, I have listed some of the useful codes examples to help you become more productive in your day to day work.
Сьюзан шла вперед, повторяя это имя, ее глаза неотрывно смотрели на экран. - Дэвид! - воскликнула она, еле держась на ногах. - О, Дэвид… как они могли… Фонтейн растерялся: - Вы знаете этого человека. Сьюзан застыла в полутора метрах от экрана, ошеломленная увиденным, и все называла имя человека, которого любила. ГЛАВА 115 В голове Дэвида Беккера была бесконечная пустота. Я умер.
Слава Богу, разрешено хоть. Стратмор требовал запретить всяческий доступ, но Фонтейн настоял на. - В шифровалке нет камер слежения? - удивился Бринкерхофф. - А что, - спросила она, не отрываясь от монитора, - нам с Кармен нужно укромное местечко.
Сьюзан словно во сне подошла и села с ним. - Сьюзан, - начал он, - я не был с тобой вполне откровенен. ГЛАВА 73 У Дэвида Беккера было такое ощущение, будто его лицо обдали скипидаром и подожгли. Он катался по полу и сквозь мутную пелену в глазах видел девушку, бегущую к вращающейся двери. Она бежала короткими испуганными прыжками, волоча по кафельному полу туристскую сумку.
Как ее зовут? - Женщина лукаво подмигнула. - Меган, - сказал он печально. - Я полагаю, что у вашей подруги есть и фамилия. Беккер шумно вздохнул.
Это можно было предвидеть, - подумала Сьюзан. -Ангел-хранитель. - И, полагаю, если с Танкадо что-нибудь случится, эта загадочная личность продаст ключ.
Your email address will not be published. Required fields are marked *