What are the requirements for variable names in VB?

Updated on technology 2024-05-21
8 answers
  1. Anonymous users2024-02-11

    It seems that as long as the name is not the same as the reserved word, there will be no error!

    Also, the name should not exceed 8 characters, otherwise all other characters are invalid characters.

  2. Anonymous users2024-02-10

    1.Avoid reserved words in vb.

    2.Easy to recognize memory.

    Tongcheng 2007 should help you find exactly what you need. It is recommended that the landlord have time to read. This helps to write and read the canonical**.

    There may be differences in the naming rules of variables in different languages, such as the problem of size-sensitivity, but it is not as big as the landlord thinks.

  3. Anonymous users2024-02-09

    In fact, you just need to name it according to your habits.

    However, the premise is that the reserved word VB cannot be used.

  4. Anonymous users2024-02-08

    1. Must start with a letter;

    2. It cannot contain embedded periods or type declaration characters;

    3. It cannot have the same name as the restricted keyword;

    4. The name of the control, form, class and module cannot exceed 255 characters, and the name of the control, form, class and module cannot exceed 40 characters;

  5. Anonymous users2024-02-07

    1 Must start with a letter or kanji, consist of letters kanji numbers or underscores, and cannot exceed 255 characters in length.

    2 Reserved words in VB cannot be used.

    3 VB does not distinguish between the case of variable names. However, variable names are usually capitalized.

  6. Anonymous users2024-02-06

    The initial letter of vb6 can only be English letters or Chinese characters (Chinese version only), and cannot be underscored.

  7. Anonymous users2024-02-05

    1. Must start with a letter;

    2. Only English letters and Arabic numerals can be used.

    and underscores (kanji can actually be used);

    3. It cannot have the same name as the restricted keyword, such as vbred, command, etc.

    4. The name of the control, form, class and module cannot exceed 255 characters, and the name of the control, form, class and module cannot exceed 40 characters;

    5. Case-insensitive.

  8. Anonymous users2024-02-04

    1. It must start with a letter or a man;

    2. It cannot contain embedded periods or type declaration characters;

    3. It cannot have the same name as the restricted keyword;

    4. The name of the control, form, class and module cannot exceed 255 characters, and the name of the control, form, class and module cannot exceed 40 characters;

    5. Naming is generally in pinyin, pinyin initials or English according to their own habits.

    6. If the program is large and completed by multiple people, it should be named according to the following rules:

    1. Hungarian nomenclature

    2. Camel nomenclature [camelcase].

    3. Pascalcase nomenclature

    These are all common nomenclature used in programming.

    Finally, if you make up your own applet, then whatever, as long as you understand it, it's OK!

Related questions
3 answers2024-05-21

A variable is an amount that can be changed within a defined range and is used to store the value of a parameter. >>>More

10 answers2024-05-21

a = "n c hundred du q49232 ah ah ah pp"

mid(trim(a), 9, 5) 'From the 9th character from left to right (spaces are also counted), count 5 characters you want. >>>More

3 answers2024-05-21

Two commandbuttons, two lables, two texts"

private sub command1_click()r = >>>More

12 answers2024-05-21

option explicit statement.

Used at the module level to force all variables in the module to be explicitly declared. >>>More

6 answers2024-05-21

The second line declares that the textbox control array ** is wrong and does not conform to the syntax specification! >>>More