Syntax - Rules for commands & files |
In computer science all operating systems, software and support documents have rules that describe how to use it is used. In the case of used incorrectly example will be followed by the message 'The syntax error' or some in that regard. And a text editor (for example WORD) has its own rules of control of typed text through orders through the menus, but orders for compiling generally not seen. No general rule, but there are several guidelines whatever.
Rules of of writing commands of operating system
Describe the syntax for the command of any operating system is not possible in a few sentences. One thing is for sure, we should at least read the manual (RTFM). Commands are KEY_WORD (hereafter KW) to be entered in the command window operating system, and if necessary, they can add OPTION (hereafter op), which directs the flow of detailed course of action to follow. The MS-DOS operating system that was the only mode. Windows and Linux OS users can 'contact' via a graphical user interface (GUI - Graphical User Interface), and over the corresponding term in the menus or icons opens the 'Command Window - CMD' with the properties of the command mode. Interface prior to the placing commands in the form of the line that contains the keyword command with accompanying her options and / or arguments is called a command-line interface - CLI (Command Line Interface). By typing a keywords and the possible options and / or arguments followed of key presses <ENTER>.
General label of use command would be approximately like this:
KW [op] {op_1, op_2, .. , op_N} {op_1 | op_2 | .. || op_N}
Square brackets indicates an option that must be used, and curly bracket options that do not have to, and parting options ' , ' indicating that they used one or more of them simultaneously, a parting ' | ' and ' || ' indicates the possible use of only one groups of the options in relation to the parting (options on the left or right side of the parting), with a double line indicates the first distribution by priority. Depending on the operating system, the parting of the instructions that describe the syntax can be another sign. A quick insight into the possibilities of commands or commands and brief instructions for their use are given order:
KW /? (MS-DOS, Windows operating systems) KW --help (Unix-Linux operating systems)
or even better for Unix-Linux operating systems:
man KW (Unix-Linux operating systems)
There is no excuse for ignorance! RTFM. In the 'Google' type 'define: RTFM' :-).
Rules of labeling devices, directories and files
Each file is located on a device (disk, optical media, floppy ...) is located at the top (root) structure, or otherwise called the tree or folder contents themselves, or is inside a folder (directory, folder) inside the structure. In the operating system of the devices are recognized as an alphabetic character or a host name and character ' : ', or something else depending on the operating system, and the path to the file described by the distributor in the syntax of the system must be respected. The current 'position' of users in relation to the 'top' filesystem device defines 'PROMPT', only visible in the command window:
C:\Program Files\Intel\ANS> (DOS-Windows OS) buzdo:~/debian/etc/amavis/en_us> (Unix-Linux OS)
Distributors in the examples is definitely not the same, and when you use commands should take care of the operating system in which they are used. 'Prompt' is also the path to the file NAME.TYPE. The above specification file is not the rule. For DOS operating system name is 8 characters in ASCII code, and 3 characters for the type, separated by a period. In the Unix-like system is not necessarily defined file type, although appropriate action against any type of file can be used directly to program support, for example, activate the Internet browser by clicking on the file types .HTML. It is not superfluous to state that in the name of the file is not advisable to use local graphemes, and instead use the space better character ' _ ' or ' - '. Another very important difference between Windows and Unix operating systems - large and small letters in the names of directories and files just as they interpret the Windows system, while in Unix systems this is not the case (case-sensitive). Unix-Linux operating system is case sensitive, so the files 'Drago.txt' is not the same as the file 'drago.txt'.
Rules of of writing HTML (Hyper Text Mark-up Language) documents
To format an HTML document using the ELEMENT (E) that are described using a key_word or letter (body, title, p, a ..). Each of the elements is encapsulated by TAG (markings corresponding element), a leading '<E>' and the closing '</E>', and in between the start and end tag is useful content. Allowed the 'embedding', i.e. start and end tag of one element may be contained within the start and end tag of another.
The example below shows the minimum must contain an HTML document. The first two lines are the description of the specification. Element defined of HTML is tags <html> and </html> indicate that between them there is 'Hyper Text Mark-up Language' content. Basically, the Internet browser displays what lies inside the element BODY surrounded with <body> and </body>. Between tags <html> and <body> are elements HEAD, META, LINK and TITLE, of which META and LINK without closed tag. So finding a specification. These elements are described in more detail page and define how to understand search engine (Google ..) and Internet browser, and elements within the BODY element defines the appearance of content that is presented to the user. In the example shown is an element of P which describes the appearance of a paragraph, and there you can find many more, as TABLE, IMG, DIV, SPAN and the other for an intrinsic purpose.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <title>Title of page length of 30-50 characters, & with 6-12 words</title> <meta http-equiv="content-language" content="en-US"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="robots" content="follow"> <meta name="googlebot" content="noodp"> <meta name="url" content="https://informatics.buzdo.com/"> <meta name="description" content="Description character length of 80-150, but in recommended range of number for characters is 12-24 words"> <meta name="keywords" content="key, words, or phrases, in the content, of page, describes with 300-500 characters, influence rating, and typed, separated by COMMA and SPACE, uses them, search for, indexing, must, can, not, repeat, inside, this, descriptions, Not, of, interest, are, key, word, WritTeN as small or LARGE LeTteRs, while, inside, the recommended range of characters to be up to 20 words"> <meta name="author" content="Drago Radic B.sc."> <link rel="shortcut icon" href="favicon.ico"> <link href="css_js/file_name.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="css_js/file_name.js"></script> </head> <body> : <p>paragraph that you want displayed without additional shaping</p> <!-- This is how to write a comment --> <p class="set">paragraph that appears designed with CSS</p> : </body> </html>
Title and meta description text can appear in search results, and good and useful descriptive text is likely to attract customers. Properly selected keywords by title and meta description to have an impact site as described concept show high-up in search results.
The above example is written to standard 'HTML 4.01 Transitional', which allows not just strict rules on the definition and description of certain documents, which roughly means that Web browsers can understand themselves and the 'correct' some trivial errors. An organization that provides standards that would make producers of software should follow known under the abbreviation W3C (World Wide Web Consortium). In the the above example, the standard is defined by the first two lines of the document, other than the above there is 'HTML 4.01 strict', various versions of the 'XHTML' standards and many other things. Therefore, the recommendation to use the tags in lowercase, if you want to easily modify HTML pages subsequent to the XHTML specification.
The new standard 'HTML 5.x', with all its variations offers many new features, especially with regard to multimedia content, and not very compatible with the previous one. Who decides pages of site rewrite towards it must take into account and how to solve compatibility with mobile devices, because their share and review web content is increasing daily.
Rules of of writing CSS (Cascading Style Sheets) descriptions
HTML its specification defines how to set the content in the document, and CSS defines how the contents are located appear, therefore decoration and design - stylist. Current specification of CSS is version 2.1, which is essentially a version 2.0 with all previously identified and repaired defects. Use the selector mechanism which is responsible for certain styles.
[SELECTOR] { [properties]:[value]; [properties]:[value]; /* this is how to write a comment */ : [properties]:[value]; }
SELECTOR is related to ELEMENT, class or identifier, and can be a combination of some elements and characteristics (pseudo-class). Pair [properties]:[value] must be closed with the ' ; ' in each row.
body { /* selector of element <body> */ background-image:url(back/inf-abc.webp); background-repeat:repeat; } p { /* selector of element <p> */ font-family:Arial, Helvetica, sans-serif; } .txt { /* selector of element class (class="txt") */ text-align:justify; text-indent:50px; } #content { /* selector of identifier (id="content") */ position:fixed; right:10px; bottom:10px; z-index:2; /* layer 2 in which the position of image 'CONTENT' */ }
Selector ' BODY ' indicates where the page background image and how it will be repeated, the second describes the font selector will have a characteristic element surrounded by a ' P ', class '.txt' used in HTML document indicates that paragraph with specified class have dragged at the beginning and will content to be aligned between the borders of page, and the '#content' defines the location of the small image on the any page that is the link to the page 'Table_of_Contents'. This list is for example in the file 'FILE_NAME.CSS', which has no special header and ending, in relation to an HTML document from the above example is in the subdirectory [css_js], and from an HTML document calls the LINK element. Content of STYLE structure may be placed within an HTML document but must be surrounded by a tag <style type="text/css"> and </style>, can be nested within a HEAD structure or a BODY structure, but within the STYLE element surround with mark comments ('<!--' and '-->') are useful to not interpret content as text. In a similar way can be define where the file containing JavaScript in to be enforced. Apart CSS content defined in a separate file, it is possible in certain initial TAG of HTML document to define styles for individual presentation of character or conduct of the content of an ELEMENT using the following syntax:
<[ELEMENT] style="[properties]:[value];[ ]:[ ];[ ]:[ ]; .... ;[ ]:[ ]"> <span style="color:#FF0000;font-weight:bold">X</span>
This line syntax within HTML document does not have a notion of selectors. The first row is the general syntax for joining style to any element that tag's rounded some content, and the second row is an example of how to paint and reinforce the letter X in a text. The property value was specified as hexadecimal number (RGB color). A complete description of the CSS specification with a description of all properties and associated values for each attribute and the elements on which it can be applied, it is easy to find on the Internet using keywords CSS and W3C. Each pair of [properties]:[value] must be concluded with the ' ; ' except the last one. 'HTML' and 'CSS' icon on the home page of 'Informatics Alphabet' coupling the the facilities that enable testing of any web site where the address is typed into the given form. A very useful feature regarding verification pages of site.
As for programming, any programming language (language processor) has its own rules, which is best illustrated by Figure at the bottom of page 'Programs for Programming', and the syntax of this kind does not make sense to write on this page. The language processor QBASIC engaged in a separate chapter.
Marks used in 'Informatics Alphabet'
Within 'Informatics Alphabet' the following characters are used to indicate concepts or action: ' ' . [ ] , ( ) , - , - , \ \ , / / , | | , { } according to the following list:
Concerning the labeling of the images in the textbook, with the number of the images may be added one or more of the characters ' * ', which, depending on the number and color of the following means:
*(*) - image is animated * - two 'overlapped' image ** - three 'overlapped' image *......* - more 'overlapped' images ( + / - ) - dismantling of 'overlapped' images
If the 'overlapped' images described below, with numbered images of the letters (a, b, c, d) show the attainability of a sequence of additional with action L1 at label '( + / - )' behind the Figure description. Coupling to other sites are blue underlined text and sometimes images or icons, except in specific sites as 'index' or 'web joints' where the treads are defined in another way.
Of course, the above description, as far as the alphabet, belonging and abbreviations to use the mouse, as defined and described in the chapters on Microsoft operating systems.
Citing of this page: Radic, Drago. " Informatics Alphabet " Split-Croatia. {Date of access}; https://informatics.buzdo.com/specific/file. Copyright © by Drago Radic. All rights reserved. | Disclaimer |