[Adverisment]

What Are Coding Conventions?

(Working with VB Script)




VBScript Coding Conventions?

Coding conventions are suggestions that may help you write code using Microsoft Visual Basic Scripting Edition. Coding conventions can include the following:

  1. Naming conventions for objects, variables, and procedures
  2. Commenting conventions
  3. Text formatting and indenting guidelines



The main reason for using a consistent set of coding conventions is to standardize the structure and coding style of a script or set of scripts so that you and others can easily read and understand the code. Using good coding conventions results in precise, readable, and unambiguous source code that is consistent with other language conventions and as intuitive as possible.


Constant Naming Conventions

Earlier versions of VBScript had no mechanism for creating user-defined constants. Constants, if used, were implemented as variables and distinguished from other variables using all uppercase characters. Multiple words were separated using the underscore (_) character. For example:



  1. USER LIST MAX
  2. NEW LINE



While this is still an acceptable way to identify your constants, you may want to use an alternative naming scheme, now that you can create true constants using the Const statement. This convention uses a mixed-case format in which constant names have a "con" prefix. For example:

ConYourOwnConstant


Variable Naming Conventions

For purposes of readability and consistency, use the following prefixes with descriptive names for variables in your VBScript code.

Subtype Prefix Example
Boolean bln blnFound
Byte byt bytRasterData
Date(Time) dtm dtmStart
Double dbl dblTolerance
Error err errOrderNum
Integer int intQuantity
Long lng lngDistance
Object obj objCurrent
Single sng sngAverage
String str strFirstName




COMMENTS

Advertisement

Name

CBSE,1,Essay Writing,7,G.K & Current Affairs,9,Information & Technology,24,Letter Writing,8,News Letter,10,Passage Writing,3,Report Writing,2,SEBA,1,
ltr
item
Teacher Notes: What Are Coding Conventions?
What Are Coding Conventions?
(Working with VB Script)
https://images.hasgeek.com/embed/file/d8dc79ff9c0546c4af6d87c48fd99ad7
Teacher Notes
https://www.freeteachernotes.com/2019/11/what-are-coding-conventions.html
https://www.freeteachernotes.com/
https://www.freeteachernotes.com/
https://www.freeteachernotes.com/2019/11/what-are-coding-conventions.html
true
2332357964370966229
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy