Top "Syntax" questions

Syntax refers to the actual language elements and symbols themselves.

Is there a standardized method to swap two variables in Python?

In Python, I've seen two variable values swapped using this syntax: left, right = right, left Is this considered the standard …

python syntax swap conventions
What is the difference between syntax and semantics in programming languages?

What is the difference between syntax and semantics in programming languages (like C, C++)?

syntax programming-languages semantics
How do I syntax check a Bash script without running it?

Is it possible to check a bash script syntax without executing it? Using Perl, I can run perl -c 'script …

linux bash unix syntax gnu
What's the u prefix in a Python string?

Like in: u'Hello' My guess is that it indicates "Unicode", is it correct? If so, since when is it available?

python syntax
Difference between >>> and >>

What is the difference between >>> and >> operators in Java?

java syntax operators
How do I select an element in jQuery by using a variable for the ID?

For example, the following selects a division with id="2": row = $("body").find("#2"); How do I do something like this: row_…

jquery syntax select
What is the meaning of prepended double colon "::"?

I found this line of a code in a class which I have to modify: ::Configuration * tmpCo = m_configurationDB;//pointer …

c++ syntax namespaces scope-resolution global-namespace
How do I remove javascript validation from my eclipse project?

I am using eclipse on my project and while messing around with my eclipse settings, I turned on Javascript support. …

javascript jquery eclipse validation syntax
Difference between if () { } and if () : endif;

Are there any differences between... if ($value) { } ...and... if ($value): endif; ?

php syntax
Python print statement “Syntax Error: invalid syntax”

Why is Python giving me a syntax error at the simple print statement on line 9? import hashlib, sys m = hashlib.…

python python-3.x syntax syntax-error