Premium Essay

Visual Basic Naming Rules

In:

Submitted By steven2164
Words 723
Pages 3
Visual Basic Naming Rules Use the following rules when you name procedures, constants, variables, and arguments in a Visual Basic module: •You must use a letter as the first character. •You can't use a space, period (.), exclamation mark (!), or the characters @, &, $, # in the name. •Name can't exceed 255 characters in length. •Generally, you shouldn't use any names that are the same as the functions, statements, and methods in Visual Basic. You end up shadowing the same keywords in the language. http://msdn.microsoft.com/en-us/library/office/ee440536(v=office.12).aspx Python Variable Naming Rules: 1. Must begin with a letter (a - z, A - B) or underscore (_). 2. Other characters can be letters, numbers or _ only.
3. Variable names are Case Sensitive. 4. There are some reserved words which we cannot use as a variable name because Python uses them for other things.
These are: and,del,from,not,while,as,elif,global,or,with,assert,else,if,pass,yield,break,except,import,print,break,except,import,print,class,exec,in,raise,class,exec,in,raise,continue,finally,is,return,continue,finally,is,return,def,for,lambda and try. http://www.programr.com/python-variable-naming-rules General Naming Conventions for Java.
Names representing packages should be in all lower case. Package naming convention used by Sun for the Java core packages. The initial package name representing the domain name must be in lower case. Names representing types must be nouns and written in mixed case starting with upper case.

Variable names must be in mixed case starting with lower case. Common practice in the Java development community and also the naming convention for variables used by Sun for the Java core packages. Makes variables easy to distinguish from types, and effectively resolves potential naming collision as in the declaration Line. 5. Names

Similar Documents

Premium Essay

Pt1420 Researching Variable Naming Rules

...Visual Basic has been labeled to be the most successful programming language in the history of programming. In 1991, Microsoft built Visual Basic on the older BASIC language – Beginner’s All purpose Symbolic Instruction Code (Mabutt). In the late 1980s, Alan Cooper, owner of Tripod, developed drag-and-drop interface, Ruby, which was also an influence to the idea of Visual Basic (History of Visual Basics). Just like any spoken language, rules must be followed in order to create effective communication between two people. For programming languages, it is necessary to follow all naming rules in order to build the program. Visual Basic’s variable name rules are as follows: Up to 255 characters, names must begin with a letter, no embedded spaces or special characters are to be used besides the underscore “__”, there cannot be a reserved word, uppercase and lowercase should be used with a purpose, and names cannot be repeated with the same level of scope (Visual Basic Naming Rules). If a developer does not follow these rules when using Visual Basic, there will be errors that may occur even before the program can be tested. Python Python is another common programming language, and was influenced by the design of ABC (Lukaszewski). In the 1996, Guido van Rossum created his very own version of ABCs, which we all know now as Python (Lukaszewski). Python is a basic syntax used for statement grouping, a list, strings, and numbers (Lukaszewski). Because it is another programming language...

Words: 653 - Pages: 3

Free Essay

Researching Variable Naming Rules

...PT 1420 Unit 2 Research Assignment 1 12/28/2013 Unit 2 Research Assignment 1: Researching Variable Naming Rules Variable Naming Rules of Visual Basic * The first character must be a letter. * The usage of spaces, period (.), comma (,), Exclamation mark (!), or the characters @, &, $, # in the variable name are not allowed, but the underscore (_) is a valid character. * The name must be less than 256 characters in length. * You cannot use any names that are the identical as the functions, statements, and methods in Visual Basic. Variable Naming Rules of Python * The first character of the variable name must begin with a letter (a – z, A – Z), or an underscore (_). * The name can only consist of letters, numbers, and underscores (no special characters). * Variable names are case sensitive. * The variable name cannot be identical as a reserved name in Python due to the fact that Python uses them for other things. Variable Naming Rules of Java * Variable names are case sensitive. * A variable name can be any length as long as it is within the Unicode letter and digit standard, also you should use a letter as the first character of the variable word. You are allowed to use the dollar sign or underscore ($, _ ) as a first character but it isn’t recommended. * The only characters other than letters and number that can be used is the dollar sign and underscore (“$”, “_”), and no other special characters may be allowed. * If...

Words: 702 - Pages: 3

Premium Essay

Unit 2 Research Assignment

...Researching Variable Naming Rules The variable naming rules for Visual Basic, Python, and Java have many different facets to them. These are the most common and most used programming languages in use today. Over the years these languages have become more user-friendly and easier to comprehend to write programs. Visual Basic is most used in introductory program writing and common for students’ first learning of programming. Some of the naming rules for Visual Basic are: the first character of the name must be a letter, you can’t use a space, period, exclamation point, or these special characters - &, @, $, or # in the name, the name cant’ exceed 255 characters in length, and Visual Basic isn't case-sensitive, but it preserves the capitalization in the statement where the name is declared. (Microsoft, 2014) Python provides a special process called the PEP process, short for Python Enhancement Process for changes proposed to Python. (University, 2014) Some of the naming rules for Python are as follows : indentation should be done using four spaces per indentation level, lines should be less than 80 characters as compared to Visual Basic and its use of a maximum of 255 characters, and lines that get too long should be aligned in a “reasonable” fashion, for example aligned with an open delimiter and at a different indentation level than any following indented suites. These are just some of the parameters to consider when naming in Python as there are...

Words: 625 - Pages: 3

Premium Essay

Unit 2 Research Assignment

...Visual Basic is the first programming language with an exemplary number of variable naming rules. The msdn.microsoft.com article explains the rules well. To start a word you must use a letter of the alphabet as the first character. You cannot use a space, nor a period, nor an exclamation mark, or the special characters of @ (at), & (and), $ (dollar sign), # (pound key) in the name. The name cannot surpass 255 characters in total length either. Names have to be precisely identified if the variable name is the same as an already existing one. You cannot repeat names in the same scope without the name being a different variable type. Lastly, while Visual Basic is not case-sensitive, it keeps the capitalization in the statement where the name is defined. Python is the next programming language where it gives you slightly more freedom for a variable name. A name must begin with a letter, lowercase or uppercase or an underscore. Python is case sensitive as well, consistency is important for read-ability. The variable name can be any “reasonable” length according to w3resource.com. Lastly, there are some reserved words Python uses for other things, which yourself cannot use. Java is the last of the three programming languages and no surprising exception to the naming rules. Names are case-sensitive, while you can begin a variable name with the $ sign or _ symbol, it is highly discouraged. The docs.oracle.com documentation of Java variable names tells the reader to always change...

Words: 541 - Pages: 3

Premium Essay

Rules of Programming Languages

...When dealing with the variable naming of Visual Basic, Python, and Java There are a few rules. When naming in Visual Basic, the name cannot exceed 255 characters in length. The name must contain a letter as the first character, and finally, the name cannot contain a; space, period, exclamation mark, dollar sign, or @, &, and # character in the name. When naming in Python all the characters and the name must begin with a letter or underscore. No other characters can be used. Variable names are Case Sensitive, and certain words are reserved. These words cannot be used as a variable name because Python utilizes these words them for other commands. Some of these reserved words are: and, del, from, not, while, as, elif, global, or, with, assert, else, if, pass, yield, break, except, import, print, break, except, import,
 print, class, exec, in, raise, class, exec, raise, continue, finally, is, return, continue, finally, is, return, def, for, lambda and try. Java also has variable language rules. First, a variable name must begin with a letter, underscore, or Unicode currency symbol, the initial character can be followed by any number of letters, numbers, underscore characters, and Unicode currency symbols. Also a variable name can’t contain spaces, and a query result is a type of variable, so it overwrites a local variable with the same name. Each language has similarities regarding variable naming. None of the discussed programs allow spaces in the name. Each language...

Words: 371 - Pages: 2

Premium Essay

Variable Naming Rules

...PT 1420 U2R1: Researching Variable Rules The following rules should be observed when naming procedures, constants, variables, and arguments in a Visual Basic module: * A letter must be used as the first character. * A space, Period (.), exclamation mark (!), and the characters, @, &, #, cannot be used in the name. * 255 characters is the maximum amount of characters a name can contain. * Names should not generally be the same as functions, statements or methods. Keywords from the language end up being shadowed. To use an intrinsic (natural, or essential) language, function, statement that happens to conflict with an assigned name, it must be explicitly identified; one must precede the intrinsic command with the name of the associated type library. For example, if a variable is named, “function,” one must use “VBA.function,” to invoke the function used in a name. * Visual Basic isn't case-sensitive, but it preserves the capitalization in the statement where the name is declared. When using Python the variable naming rules apply as such: * Must begin with a letter (a - z, A - B) or underscore (_) * Any other characters can be letters, numbers or _ * Case Sensitive. * Can be any (reasonable) length. There are some reserved words which you cannot use as a variable name because Python uses them. These words consist of: and, del, from, not, while, as, elif, global, or, with, assert, else, if, pass, yield, break, except...

Words: 616 - Pages: 3

Premium Essay

Programming

...program’s structure. Formulate solution algorithms for calculations by properly following the order of operations. Assignment Requirements Answer: * Short Answer 1, 2, 3, and 4 on page 71 * Algorithm Workbench Review Questions 1 and 2 on page 71 * Programming Exercises Questions 1 and 4, starting on page 72 Required Resources Textbook Submission Requirements Submit your written answers to your instructor at the beginning of Unit 3. Unit 2 Research Assignment 1: Researching Variable Naming Rules Learning Objectives and Outcomes Determine program input, processing, and output stages. Create the necessary flowcharts to describe a program’s structure. Use pseudocode to define a program’s structure. Formulate solution algorithms for calculations by properly following the order of operations. Assignment Requirements Use the Internet and the ITT Tech Virtual Library to research the following questions: What are the variable naming rules of Visual Basic, Python, and Java? List three similarities and differences in between the three programming languages. Required Resources Textbook ITT Tech Virtual Library: http://library.itt-tech.edu Submission Requirements Submit your written answers to your instructor at the beginning of Unit 3. Labs Unit 2 Lab 2.1: Pseudocode Learning Objectives and Outcomes * Use pseudocode to define a program’s structure. * Formulate solution algorithms for calculations by properly following the order of...

Words: 450 - Pages: 2

Premium Essay

Its Making Put Something Here

...flowcharts and pseudo code. CO3: Write programs that perform input, processing, and output. Unit Learning Outcomes LO8: Determine program input, processing, and output stages. LO9: Create the necessary flowcharts to describe a program’s structure. LO10: Use pseudocode to define a program’s structure. LO11: Formulate solution algorithms for calculations by properly following the order of operations. Key Concepts ▪ Determining input, process, and output ▪ Creating flowcharts and pseudocode ▪ Formulating algorithms Reading ▪ Gaddis, Chapter 2: “Introduction to Computers and Programming,” pages 29-55 Resources: • Data Projector • ITT Virtual Library • Text Books • Visual Studio • Lab Computers • Student Removable Hard Drive • VM Ware Player Methods: • Lecture • Group Discussion • Lab Work • Review exercise / Research Papers • Quiz Brief Lesson Overview: Today’s lecture we would be discussing the following topics. • Discuss how all programs basically consist of a three-step process: input, process, and output. Use the payroll calculation program example from Figure 2.3 on page 34 of the textbook to illustrate this process. Ask students to think of and share other examples that follow this three-step process. • Discuss how a necessary input and process is used to achieve an output, which is not always very easy to determine...

Words: 895 - Pages: 4

Premium Essay

Unit 2 Research Assignment

...Unit 2 Assignment: Research 1. What are the variable naming rules of Visual Basic, Python, and Java? * Visual Basic requires you to use a letter as your first character. You are unable to use spaces, periods, exclamation marks, and other special characters within the name, consisting of: @, &, $, #. The name also can’t exceed 255 characters. You can’t repeat the same names within the same level of scope. There’s also a few other minor rules to follow as well. * Python allows you to use either a letter or underscore character as the first character in a line. You can use an unlimited amount of letter, numbers, or underscore characters following that. Python is also case sensitive and therefore makes upper and lower case characters important. Any digit number will work including and between the numbers 0 through 9. * Java can use Unicode letters, digits, and two special characters such as an underscore and dollar sign. Java is also case sensitive. A variable’s name can be any legal identifier. The length of a variable name can also be any number. The beginning variable can consist of either letters or underscore characters. White space isn’t permitted, special characters aren’t allowed, and digits cannot be used at the start. Subsequent characters are able to be letters, digits, dollar signs, or underscore characters. Finally, variable names must not be a keyword or reserved word. 2. List three similarities and differences between the three programming...

Words: 337 - Pages: 2

Premium Essay

Research Paper

...Researching Variable Naming Rules Visual Basic You must use a letter as the first character. You can't use a space, period (.), exclamation mark (!), or the characters @, &, $, # in the name. Name can't exceed 255 characters in length. Generally, you shouldn't use any names that are the same as the functions, statements, and methods in Visual Basic. You end up shadowing the same keywords in the language. To use an intrinsic language function, statement, or method that conflicts with an assigned name, you must explicitly identify it. Precede the intrinsic function, statement, or method name with the name of the associated type library. For example, if you have a variable called Left, you can only invoke the Left function using VBA.Left. You can't repeat names within the same level of scope. For example, you can't declare two variables named age within the same procedure. However, you can declare a private variable named age and a procedure-level variable named age within the same module. Python  Must begin with a letter (a - z, A - B) or underscore (_)  Other characters can be letters, numbers or _  Case Sensitive  Can be any (reasonable) length  There are some reserved words which you cannot use as a variable name because Python uses them for other things.- See more at: http://www.w3resource.com/python/python-variable.php#sthash.5AXuVlWN.dpuf Java Variable names are case-sensitive. A variable's name can be any legal identifier — an unlimited-length...

Words: 724 - Pages: 3

Premium Essay

Database Reviewer

...data in a printed format in the way you want it | Field | Columns | Record | rows | Tables | a collection of data about a specific topic, such as products or suppliers | Queries | a command for viewing or analyzing data in different ways or a result ofthe command | Forms | a friendly interface to add a new record | Report | an object that present data in an organized way according to yourspecification | Pages | a web page that has connection to a database | Macros | a set of one or more actions that each performs a particular operation | Module | a collection of Visual Basic for Applications declarations | Datasheet view | You can add, edit, or view the data in the table | Design view | You can create an entire table from scratch, or add, delete or customize an existing table fields | Field Name | Name of the fields | Object-naming rules | A set of specific rules for naming Microsoft Access objects | Data type | domain of an attribute; it provides a list of data types that we can choose from, including Text, Memo, Number, Date, and so on | Text | Text...

Words: 723 - Pages: 3

Free Essay

Itt Technical Institute Pt1420 Unit 2

...| Stores the number of feet to be installed | 50 | Stores the calculated cost of installed fiber | .87 | Display “Welcome to the Fiber Optic Calculator Program” Set fiberCost = .87 Display “What is the company name?” Input companyName Display “How many feet of fiber will be installed” Input feetInstalled Set totalCost = fiberCost * feetInstalled Display “For the company” , companyName, “the total cost will be $” , totalCost David Camacho PT1420 Lab 2.2 Flowchart David Camacho PT1420 Programming Lab 2.3 Visual Studios Program David Camacho Unit 2 HW Assignment 1 Short Answer 1.What does a professional programmer usually do first to gain an understanding of a problem? The programmer creates a design for the program, which starts by asking the customer what they need the program to accomplish. 2.What is pseudocode? Pseudocode is an informal language that has no syntax rules, and is not meant to be compiled or executed. 3.Computer programs typically perform what three steps? Step 1: Input is received. Step 2: Some process is performed on the input. Step 3: Output is produced. 4.What does the term “user-friendly” mean? User-friendly is a term commonly used in the software business to describe programs that are easy to use. 1. Design an algorithm that prompts the user to enter his or her height and stores the user’s input in a variable named height. Display “What is your height?” Input height...

Words: 718 - Pages: 3

Free Essay

Games

...Mutant Cakes Attack _________________________________________________________________________________________________ Game Outline High Concept You are ninja. You must use your special assassin abilities to overturn the mutant cakes and take back the city in the final battle of the bulge. As ninja, the player must work her way through four different lands to conquer the mutant cakes before they take over the final landscape – the city. 1. Gameplay Goal There are four main worlds within the game which progress in a parallel layout (Adams, E. & Rollings, A. 2007). The four main worlds, Country, Residential, Industrial and City must be saved from the mutant cakes that slowly take over each world. As the player traverses each landscape destroying cakes, the enemy also continues alongside her defying being completely hunted down and destroyed. The player encounters evolved mutant cakes at the end of each world level and must defeat it before gaining access to the next world. The ultimate goal is to stop the mutant cakes from reaching the City World and conquering civilization. _____________________________________________________________________________________________      2 INFT6300 – Assignment 2: Game Script Report Daniel Michael, 3103360 UoN Trimester 1, 2010 _________________________________________________________________________________________________ The following table describes the high level game progression through each of the four worlds and the...

Words: 4857 - Pages: 20

Free Essay

Vivek

...: 4294448, 2768274 www.mcu.ac.in SCHEME FOR POST GRADUATE DIPLOMA IN COMPUTER APPLICATIONS (PGDCA) (Effective From July 2011 Session) SEMESTER -I Subject Code Subject Name Scheme L 1PGDCA1 1PGDCA2 1PGDCA3 1PGDCA4(A) 1PGDCA4(B) Fundamentals of Computers & Information Technology Introduction to Operating Systems (Dos, Windows, Linux) PC Packages Elective - 1 Foxpro MS-Access 4 4 1 3 T P Theory Paper 80 80 Internal Evaluation 20 20 Practical Exams Total Marks 100 100 4 4 1 3 3 80 80 20 20 25 25 125 125 Semester Total 450 (*L-Lecture, T-Tutorial, P-Practical) SEMESTER –II Subject Code Subject Name Scheme L 2PGDCA1 2PGDCA2 2PGDCA3 2PGDCA4(A) 2PGDCA4(B) 2PGDCA5 System Analysis and Design Programming with Visual Basic.NET Internet & E-Commerce Elective - 2 OOPs & Programming with C++ Financial Accounting with Tally Project Work 4 4 4 4 T 1 P 3 3 3 Theory Paper 80 80 80 80 Internal Evaluation 20 20 20 20 Practical Exams Total Marks 100 125 100 125 25 1 25 4 100 Semester Total 550 General Instructions: 1. For passing the subject examination minimum 40% marks must be separately scored in Theory Paper, Practical Exams and Internal Evaluation in the subject. 2. For passing the semester, minimum aggregate marks must be 45% in the semester. Course : PGDCA Sub Code : 1PGDCA1 Semester: I Subject Name : Fundamentals of Computers & Information Technology Workshops Total Hours Field Visits Practical’s UNIT–I Brief History...

Words: 4021 - Pages: 17

Premium Essay

Field Research Interview Essay

...What is the true purpose of music education? Music education should lend itself to the needs of the students that need it.  As teachers, it is our job to produce well-rounded individuals, who can function in society as model citizens therefore, the development of self is extremely important.  Music education should not only facilitate the learning process but it should support and be concerned with even the emotions of its students.  Because morality depletion in our society, children grow up not learning the basic rules of respect towards adults and each other.  Performing is also very important to the musical process because it allows the performer to demonstrate what he/she has internalized, interpreted and learned.  When the performer has reached a level where the challenge meets the ability they experience a flow which brings about satisfaction.  When the student is successful in the challenge, the student’s self-growth is elevated as well as its...

Words: 1186 - Pages: 5