Common variable naming rules in ASP

Source: Internet
Author: User
In ASP programming, if you comply with the following variable naming rules, your CodeThe feasibility and maintainability will be better:
General naming rule prefix variable type example
B or bln Boolean bsuccess
C or cur currency camount
D or DBL double dblquantity
DT or Dat Date and Time dtdate
F or FLT float fratio
L or LNG long lmilliseconds
I or Int integer icounter
S or str string sname
A or arr array ausers ()
O or obj com Object opipeline

Variable prefix of the database object:

Example of prefix object type
CNN connection cnnpubs
RST recordset rstauthors
CMD command cmdemployee
Protected field fldlastname

Prefix related to scope:

Prefix description
G _ variables created in global. asa
M _ variables created in the include file and ASP file
No prefix for non-static variables or variables in the process

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.