VBScript
Constants
VBScript does not provide support for constants, such as you find in other programming languages. You can work around this by assigning values to variables that you have defined as shown in the example below. Here, FUDGE_FACTOR is our constant.
<script language="vbscript">
<!--
dim FUDGE_FACTOR
FUDGE_FACTOR = .06
Function CalculateThis
CalculateThis = SomeVariable * FUDGE_FACTOR
End Function
-->
</script>
Print This Page | Email me when this page changes | Search This Site
- Beginners Tips
- Constants
- Scope of Variables
- Are comment tags needed?
- Combining VBScript & JavaScript
- Sub Procedure Order Ex1
- Variants and Subtypes
- Sub Procedure Order Ex2
- Seven Deadly Sins
- Timer Function Example
- Touch-type Speedometer
- Regular Expressions
- Browser and User Generated Events in Internet Explorer 4/5
Interested in programming, but don't know where to start? Beginning Programming will get you going! >> Go!
|
|
Out Now!