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

Introduction to gui design and file handling, INTRODUCTION TO GUI DESIGN AN...

INTRODUCTION TO GUI DESIGN AND FILE HANDLING   The aim of the user interface design is to attain the user's goals. When the user's goals are met, the user is satisfied and the

Switch 2 images, I have a problem with Visual Basic: exchangeable 2 image...

I have a problem with Visual Basic: exchangeable 2 images of place I have 2 picturebox''s placed a button when I click on the button, the 2 pictures of this place change with e

Variable length strings, Variable Length Strings: The Strings can be de...

Variable Length Strings: The Strings can be declared using As or $ as shown in the code below; the msg and msg1 are the two strings and they are assigned the values using '='.

Intrinsic controls, INTRINSIC CONTROLS   The Intrinsic controls are th...

INTRINSIC CONTROLS   The Intrinsic controls are the built-in controls. Few of the controls are Combo box, Check box, Command Button, Label etc. The controls have properties re

Refresh method - data control, The Refresh Method: The refresh method ...

The Refresh Method: The refresh method transfer to the first record in the record set. To invoke the refresh method follow the syntax which is as shown below: Form1.Data1.R

Storage and retrieval systems, STORAGE AND RETRIEVAL SYSTEMS   The sto...

STORAGE AND RETRIEVAL SYSTEMS   The storage system is a depository. It is a physical container and gives mechanisms to put in the depository and take them back. The retrieval

How to, need general help in pseudo code

need general help in pseudo code

Hungarian notation, Hungarian Notation: The Hungarian Notation was inv...

Hungarian Notation: The Hungarian Notation was invented by Charles Simonyi from Microsoft. It is a naming convention. It is a reminder of the type of a variable. The Handles h

Retrieval methods - document in visual programming, Retrieval Methods: ...

Retrieval Methods: There are 3 ways to find a document. The primary method is a positional retrieval. This is achieved by keeping in mind where you left it. The next method is

Mechanical project, sir , i need visual basic form design & coding for Reyn...

sir , i need visual basic form design & coding for Reynolds number & type of flow .

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