Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:vbsconstants [2015/09/14]
127.0.0.1 external edit
developer:vbsconstants [2016/01/22] (current)
sandy
Line 1: Line 1:
 ====== VBScript Constants ====== ====== VBScript Constants ======
 > **Developer:​** [[developer:​rhinoscript|RhinoScript]] > **Developer:​** [[developer:​rhinoscript|RhinoScript]]
-> **Summary:​** //Overview of VBScript constants.//+> **Summary:​** //Overview of VBScript constants//
  
-=====See Also===== +See also [[developer:​vbsfundamentals|VBScript Fundamentals]].
-[[developer:​vbsfundamentals|VBScript Fundamentals]]+
  
 =====Overview===== =====Overview=====
Line 10: Line 9:
 A constant is a meaningful name that takes the place of a number or string and never changes. VBScript defines a number of intrinsic constants. You can get information about these intrinsic constants from the VBScript language reference. A constant is a meaningful name that takes the place of a number or string and never changes. VBScript defines a number of intrinsic constants. You can get information about these intrinsic constants from the VBScript language reference.
  
-=====Creating ​Constants=====+=====Creating ​constants=====
  
 You create user-defined constants in VBScript using the **Const** statement. Using the **Const** statement, you can create string or numeric constants with meaningful names and assign them literal values. For example: You create user-defined constants in VBScript using the **Const** statement. Using the **Const** statement, you can create string or numeric constants with meaningful names and assign them literal values. For example:
Line 19: Line 18:
 </​code>​ </​code>​
  
-Note that the string literal is enclosed in quotation marks (" "). Quotation marks are the most obvious way to differentiate string values from numeric values. You represent ​Date literals and time literals by enclosing them in number signs (#). For example:+Note that the string literal is enclosed in quotation marks (" "). Quotation marks are the most obvious way to differentiate string values from numeric values. You represent ​date literals and time literals by enclosing them in number signs (#). For example:
  
 <code vb> <code vb>
Line 25: Line 24:
 </​code>​ </​code>​
  
-You may want to adopt a naming scheme to differentiate constants from variables. This will prevent ​you from trying to reassign constant values while your script is running. For example, you might want to use a "​vb"​ or "​con"​ prefix on your constant names, or you might name your constants in all capital letters. Differentiating constants from variables eliminates confusion as you develop more complex scripts.+You may want to adopt a naming scheme to differentiate constants from variables. This prevents ​you from trying to reassign constant values while your script is running. For example, you might want to use a "​vb"​ or "​con"​ prefix on your constant names, or you might name your constants in all capital letters. Differentiating constants from variables eliminates confusion as you develop more complex scripts.
  
  
developer/vbsconstants.txt · Last modified: 2016/01/22 by sandy