Creating constants in vbscript, Visual Basic Programming

Assignment Help:

In VBScript, You create user-defined constants using the Const statement. It lets you create string or numeric constants along with meaningful names and let you to assign them literal values. For illustration:

Const MyString = "This is my string." Const MyAge = 49

Note that the string literal is enclosed in quotation marks (" "). Quotation marks are the most apparent way to differentiate string values from numeric values. Date & time literals are represented through enclosing them in number signs (#). For instance:

Const CutoffDate = #6-1-97#

You may desire to adopt a naming scheme to differentiate constants from variables. It will save you from trying to reassign constant values whereas your script is running. For instance, you might desire to use a "vb" or "con" prefix on your constant names, or you may name your constants in every capital letters. Differentiating constants from variables remove confusion as you develop more complicated scripts.


Related Discussions:- Creating constants in vbscript

Odbc, ODBC   The ODBC gives an API which distinguishes the data base v...

ODBC   The ODBC gives an API which distinguishes the data base vendors implementation via the ODBC drivers specific to a DBMS. The program will use the API to call the ODBC dr

For next repetition - control statement, For ..... Next Repetition Statemen...

For ..... Next Repetition Statement: To demonstrate the working of for .. next control statement, put a command button and a label control on the form. The Handle clicks the e

Variable scope, Variables must always be described with the smallest scope ...

Variables must always be described with the smallest scope possible. VBScript variables can have the given scope. Scope Where Variable is Declared

Steps to create a rectangle in the client region, STEPS TO CREATE A RECTANG...

STEPS TO CREATE A RECTANGLE IN THE CLIENT REGION 1. Generate a SDI application and name it as a brush. 2. Handle the WM_LBUTTONDOWN message for the CBrushView object id.

Hangman, how to add the hangman images

how to add the hangman images

Create a visual basic application to play Hangman game, Create a Visual Bas...

Create a Visual Basic that allows a user to play a variation of Hangman. User Inputs The user types a letter into the textbox.   Functional Items 1. Read a

Three models for user interface design, THREE MODELS FOR USER INTERFACE DES...

THREE MODELS FOR USER INTERFACE DESIGN   The 3 models for the user interface design are the implementation model, mental model &the manifest model. The Implementation Mod

Help file property, Sets or returns wholly qualified path to a Help File. I...

Sets or returns wholly qualified path to a Help File. If Help file is indicated in HelpFile, it is called automatically when the user clicks Help button (or presses the F1 key) in

Data types - visual basic, DATA TYPES   The different primitive data t...

DATA TYPES   The different primitive data types are Boolean, Char, Byte, Date, Decimal, Uinteger, Double, Integer, Long, Sbyte, Short, Single, String, Ulong & Ushort. To decla

Imagelist, IMAGELIST The CImageList object is a collection of the same ...

IMAGELIST The CImageList object is a collection of the same sized images, all of which can be referred to by its index. The ImageList are used to proficiently manage the large

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd