executed regardless of whether a is greater than 0,foo2 (), resulting in an error.So just use {} to wrap foo1 () and Foo2 () together, okay?When we write code, we are used to add a semicolon to the right of the statement, and if you use {} In a macro, the code is equivalent to this: "{...};", as it unfolds:
if (a>0) { foo1 (); Foo2 ();};
This will not even compile through.
for these things, the gods are already in the chest, but there are some just contact Linux , Unix people like these systems may not be familiar with these variables, so I'll share them with you today. What problem can add QQ Group, we discuss together -- Ops tribe:348384728To make it easier for everyone to understand, write a simple script that will explain the meaning of each variable later.# Touch Test# VI TestThe script reads as follows: #!/bin/sh
Excerpt from: Abs_guide: http://www.tldp.org/LDP/abs/abs-guide.pdf
the meaning of shell variable $#,[email protected],$0,$1,$2 in Linux is explained:Variable Description:$$the PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?end code of the last Run command (return value)$-flag at a glance using the SET command$*all parameter lists.such as "$*" in the Cas
The meaning of shell variable $#,[email protected],$0,$1,$2 in Linux is explained:Variable Description:$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return value)$-Flag at a glance using the SET command$*All parameter lists. such as "$*" in the Case of "" ","$ $ ... $n"All parameters in the form of output.[email protected]All
Shell variables in Linux $#, [e-mail protected],$0,$1,$2 meaning explanation:Variable Description: $$ the shell itself PID (ProcessID) $! What is the PID of the Shell's last running background process? End code of the last Run command (return value) $-flag with SET command list $*all parameter lists. As"$*"With""In the case of"$ $ ... $n"all parameters in the form of output. [email protected] all parameter
$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return value)$-Flag at a glance using the SET command$*All parameter lists. such as "$*" in the Case of "" ", in the form of" $ $ ... $n "output all parameters.[Email protected]All parameter lists. such as "[email protected]" with "" "in the case, with" $ "" $ "... All parameters are output in the form "$n".$#Number of arguments added to the shell$The name of the shell
Tags: file run BSP case background POS linux lis Linux
The meaning of shell variable $#,[email protected],$0,$1,$2 in Linux is explained:Variable Description:$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return value)$-Flag at a glance using the SET command$*All parameter lists. such as "$*" in the Case of ""
still gains control of the CPU and may be replaced by another thread to gain control of the CPU. This is also what we often write in cycle Thread.Sleep (0), because this gives other threads such as the paint thread the power to gain control of the CPU, so that the interface will not feign death there.In addition, although it is mentioned above that "unless it itself abandons the CPU, it will completely occupy the CPU", but this behavior is still cons
Code , So I removed the #, and the remaining href = "". If this happens, the page will be refreshed again after loading.
Finally, we can see other people's code and get the solution. The meaning of void (0) in javascript:
In JavaScript, void is an operator that specifies to calculate an expression but does not return a value.
The format of the void operator is as follows:
1. javascript: void (expression)
2.
The meaning of shell variable $#,$@,$0,$1,$2 in Linux is explained:
Variable Description:
$$
The shell itself PID (ProcessID)
$!
The PID of the Shell's last running background process
$?
End code of the last command to run (return value)
$-
Flag list using the SET command
$*
A list of all parameters. Output all parameters in the form of "$ $n", as in the case of "$*" with "".
$@
A list of all parameters. su
void (0) is used to perform certain processing, but does not refresh the page as a whole.Javascript:void (0) indicates that no action is done. Such as:This indicates that this link does not do a jump action, performing the onclick event.I'd like to use Ajax for all the usual code like this: But what is the meaning of void (0
printf "The complete list is%s\n" "$$" 24520 the shell itself PIDprintf "The complete list is%s\n" "$!" PID of the last running background process of the empty shellprintf "The complete list is%s\n" "$?" 0 end code of the last Run command (return value)printf "The complete list is%s\n" "$*" 123 all parameters List of QQ. such as "$*" in the Case of "" ", in the form of" $ $ ... $n "output all parameters.printf "The complete list is%s\n" "[email protec
From:http://www.jb51.net/article/71532.htm In JavaScript, Void is an operator that specifies that an expression is evaluated but does not return a value. I'd like to use Ajax for all the usual code like this: The code is as follows: But what is the meaning of void (0) here? The void operator uses the following format: 1. javascript:void (expression) 2. Javascript:void expression Expression is a standard of
...; END: Free (PTR); return 0 ; }Because Goto does not conform to the structure of software engineering, and it is possible to make the code difficult to understand, so many people do not advocate the use of this time, you can use Do{}while (0) for unified management: int Foo () {somestruct * ptr = malloc (...); do {dosomething ...; if (Error) { break ; } dosomething ...; if
This code is common to everyone:But what is the meaning of void (0) here?The void in JavaScript is an operator,This operator specifies that an expression is to be evaluated but does not return a value。The void operator uses the following format:1. javascript:void (expression)2. Javascript:void expressionExpression is a standard of Javascript to evaluate. Parentheses on the outside of the expression are opti
Linux Kernel and some other open-source code often encounter such code:
do{ ...}while(0)
Such code is not a loop at first glance. Do... while has no meaning at all on the surface, so why should we use it like this?
In fact, do {...} while (0) is much more effective than beautifying your code. I checked some information and summarized the following
The Linux kernel and some other Open-source code often encounter code like this:
do{...}while (0)Such code is not a loop, do ... While on the surface there is no meaning here, then why use it?
In fact, do{...} while (0) is much more useful than beautifying your code. Check some information, summed up this writing mainly has the following advantages:
1. Assist
##*/} getYou can verify the code inside the catif test "$ (id-u)"-ne 0; Thenecho "${0##*/}: Only the root can use ${0##*/}" 1>2Exit 1FiWe'll see the next, ${0%/*}Just post the official website to explain${parameter%word}${parameter%%word}The word is expanded-produce a pattern just as in filename expansion. If the patte
We often use code such as Javascript:void (0), so what does javascript:void (0) mean in JavaScript?The key in Javascript:void (0) is the Void keyword, which is a very important keyword in JavaScript, which specifies that an expression is evaluated but does not return a value.The syntax format is as follows:Head>Scripttype= "Text/javascript">voidfunc () javascript
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.