Presentation is loading. Please wait.

Presentation is loading. Please wait.

FG Group -Afrilia BP -Liana F.B.I -Maulidatun Nisa -Riza Amini F.

Similar presentations


Presentation on theme: "FG Group -Afrilia BP -Liana F.B.I -Maulidatun Nisa -Riza Amini F."— Presentation transcript:

1 FG Group -Afrilia BP -Liana F.B.I -Maulidatun Nisa -Riza Amini F

2 Syntax  - A set of rules that defines the form of the language. - Syntax defines how a sentence is constructed as a sequence / order of the selection of a basic word. - The word is constructed with alphabetic characters. example keywords (reserve word) in C: while, do, if, else, etc.. - Syntax manage to combine these words into a statement with the correct shape so it can be prepared a program that can be run correctly. - Syntax not understand the meaning or content of a sentence, semantic who can interpret it. - Syntax providing other forms of notation for communication between programmer and programming language processors, thus simplifying the creation of a program. - The syntax of the programming language is defined by two sets of rules, namely rule lexical and syntactic rules. - Lexical rules specify the character set contained in the alphabet of the language and the way that these characters combined into valid words and acceptable. - An example is the Pascal language that does not pay attention to uppercase and lowercase letters, while the C and Ada language and pay attention to distinguish it.

3 Criteria Syntax  1) Readability: Easy to read. 2) Writeability: Easy written. 3) verifiability: Verification program (the concept of truth). 4) Ease of Translation: Translators are fast and produce efficient code. 5) Reduction of Ambiguity: Two or more meanings, examples Array (function call)

4 Function Syntax  Function syntax provides a notation for forms of communication and processing between programmer programming languages ​​ so as to facilitate the creation of a program.

5 Syntax Elements  1. Character set: function syntax provides a notation for forms of communication between programmers and language processing program can facilitate the creation of a program. 2. Identifier: the basic syntax of an identifier that is often used is a string of letters and numbers that start with the letter. However, there are many variations of the programming language that uses an identifier with a "." Or "-". This will affect the ease of reading programs. 3. Symbols for operator: Most programming languages ​​ use the character "+" and "-" to represent the two basic arithmetic operations, and use a combination as well as take advantage of special characters. For an operator, or use string to FORTRAN with like the operator. EQ. to compare the similarities and ** for powers.

6  4. Comments: Adding comments in a program is important from a program documentation. Programming languages ​​ allow comments in some form. A separate comment lines in the program as in FORTRAN. The use of special characters that do not care about the line like / * and * / in C language Starting from just anywhere sector in line with the start of a special character, such as "-" in, "/ /" in C + + or "!" In FORTRAN. Noise Word: Is the word choice in a statement inserted to improve readability. An example is the statement GO TO label. GO is required keywords, while TO is optional which will improve readability. 5. Keyword & Reserved Word: Keyword is an identifier that is used as a permanent part of the syntax of a statement. For example IF for start a DO statement or condition to initiate an iteration in FORTRAN language. Keyword is a reserved word if it is not used as an identifier chosen by the programmer. For example, in FORTRAN language, and DO IF identifier can be selected as a variable name by the programmer so that a statement that starts with IF is not necessarily a condition statement.

7  6. Blank: Rules on the use of space kind as programming language is an example of the C language Usually spaced ignored, except if there is a symbol "= +" which is a single operator. When separated by a space there will be a syntax error. 7. Delimiter & Brackets: Delimiter is a syntactic element is used to mark a prefix or suffix of a syntactic unit such statement or expression. The brackets are usually paired with a delimiter, such as braces or begin... end pair said. Delimiter is useful to improve the readability of a program and can also eliminate the ambiguity of a statement because it can be used explicitly to separate statements that are similar 8. Expression: is a function that accesses data in a program and returns a value. Expression is the basis of syntactic blocks of statements are constructed.

8 Thank you for attention  Time is a Question !


Download ppt "FG Group -Afrilia BP -Liana F.B.I -Maulidatun Nisa -Riza Amini F."

Similar presentations


Ads by Google