Wednesday, January 12, 2011

VB Scripts

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/
Scripting Conventions
1.1 Variable Naming Conventions
To enhance readability and consistency, use the following prefixes with descriptive names for variables in your code.

Subtype Prefix Example
Array arr arrCountry
Boolean bln blnFound
Byte byt bytRasterData
Currency cur curRate
Date (Time) dtm dtmStart
Double dbl dblTolerance
Enum enum enumWeekDays
Error err errOrderNum
Integer int intQuantity
Long lng lngDistance
Object obj objCurrent
Single sng sngAverage
String str strFirstName
The body of a variable or function name should use mixed case and should be as descriptive as necessary. In addition, function names should begin with a verb, such as strNameArray or fncCloseDialog.
For frequently used or long terms, standard abbreviations are recommended to help keep name length reasonable. In general, variable names greater than 32 characters can be difficult to read. When using abbreviations, make sure they are consistent throughout the entire script. For example, randomly switching between Cnt and Count within a script or set of scripts may lead to confusion.


1.2 Object Naming Conventions
The following table lists recommended conventions for web objects:
Object Type Prefix Example
Browser bro broBrowser
Dialog dlg dlgFileOpen
Frame fra fraLanguage
Horizontal Scroll Bar hsb hsbVolume
Image img imgIcon
Label lbl lblHelpMessage
Link lnk lnkLogout
Page pag pagHome
SwfWindow swin swinSchoolDetails
SwfButton sbtn sbtnAddress
SwfCheckBox schk schkPrimaryClass
SwfComboBox scbo scboCountry
SwfEdit sedt sedtPassword
SwfLabel slbl slblContactDetails
SwfListView slstv slstvSchoolDetails
SwfObject sobj sobjAddressControl
SwfStatusBar ssb ssbSchool
SwfTable stbl stblGridControl
SwfToolBar stb stbStatusBar
ViewLink vlnk vlnkPreferences
Vertical Scroll Bar vsb vsbRate
WebArea ware wareRemarks
WebButton wbtn wbtnOk
WebCheckBox wchk wchkHobbies
WebComboBox wcbo wcboEnglish
WebEdit wedt wedtUsername
WebElement emt wemtCurrenty
WebFile wfil wfilTestData
WebList wlst wlstCountry
WebRadioGroup wrgr wrgrGender
WebTable wtbl wtblSalesInfo
Window win winNotepad
WinButton winbtn winbtnYes
WinCheckBox winchk winchkHobbies
WinComboBox wincbo wincboEnglish
WinEdit winedt winedtSalesBox
WinListView winlstv winlstvSchoolDetails
WinObject winobj winobjDescriptionBar

• Block Comments


‘*******************************************************************************
‘ Name:
' Author:
‘ Description:
' Pre-Requisites: Input file abcd.txt is in dir z:\
‘ Input files: Input.xls

' History:
' Date Version No. Author Description
------ -------------- --------- --------------
'
'
' *******************************************************************************

Thanks,
Shahadat Khan

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

No comments:

Post a Comment