Setting environment variables in windows

Source: Internet
Author: User
Tags arithmetic bitwise numeric
SET [variable = [string]
Variable specifies the environment variable name.
String specifies a series of characters to be assigned to a variable.
********************************
You can only type SET without adding parameters to display the current environment variables.
********************************
If the command extension is enabled, SET changes as follows:
You can use only one variable to activate the SET command. The equal sign or value does not show any prefix matching.
The value of all variables of the name used by the SET command. For example:
SET P
All the variables starting with the letter P are displayed.
*********************************
If the variable name cannot be found in the current environment, the SET command sets ERRORLEVEL
Set to 1.
*********************************
The SET command does not allow variable names to contain equal signs.
Two new replicas are added to the SET command:
SET/A expression
SET/P variable = [promptString]
The/A command option specifies the string on the right of the equal sign as the evaluated numeric expression. This expression
The evaluator is simple and supports the following operations in descending priority order:
()-Group
*/%-Arithmetic operator
+--Arithmetic operator
<>-Logical shift
-Bitwise "and"
^-Bitwise "exception"
|-Bitwise "or"
= * =/= % = + =--Value assignment
<=>>=
,-Expression separator
************************************
If you use any logical or remainder operators, you must use the expression string
Enclose the quotation marks. Any non-numeric string key in the expression as an environment variable
The environment variable name value has been converted to a number before use. If you specify
Environment variable name, but not defined in the current environment, the value will be set
Zero. This allows you to use the environment variable value for calculation without typing those % symbols.

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.