You can edit almost every page by Creating an account. Otherwise, see the FAQ.

Linear syntax

From EverybodyWiki Bios & Wiki


Linear syntax is a computer-programming term for an expression that can be parsed from left to right. Linear syntax implies the ability to write code without the use of line-feed or carriage-return characters. Although the use of such characters is recommended for code readability, they are optional, as compilers do not rely on them to parse and compile the code. HTML, C, and SQL code are examples of languages that employ linear syntax; they all rely on commas, semicolons, and parentheses to separate code blocks.

Example[edit]

C[edit]

Linear example in C:

void main() { printf("Hello world!"); }

Non-linear example in C:

void main() {
    printf("Hello world!");
}

HTML[edit]

Linear example in HTML:

<ul><li>Foo</li><li>Bar</li><li>Baz</li></ul>

Non-linear example in HTML:

<ul>
  <li>Foo</li>
  <li>Bar</li>
  <li>Baz</li>
</ul>

SQL[edit]

Linear example in SQL:

SELECT name FROM users WHERE lvl > 10 ORDER BY firstname;

Non-linear example in SQL:

SELECT name
FROM users
WHERE lvl > 10
ORDER BY firstname


This article "Linear syntax" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Linear syntax. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.