Explain Declarative, Scripting and Document Formatting Languages

Best Assignment Help And Programming Project Help Online

Explain Declarative, Scripting and Document Formatting Languages

Programming Assignment Help

Declarative Languages

 

Declarative languages, also known as nonprocedural or very high-level languages, are programming languages in which a program specifies what to do rather than how to do it. There is less difference between the specification of a programme and its implementation in such languages than in the procedural languages described thus far. Logic and functional languages are the two most common types of declarative languages.

 

PROLOG Programming Language

Prolog (programming in logic), the most well-known logic programming language, expresses a programme as a set of logical relations (e.g., a grandparent is the parent of a parent of someone). These languages are comparable to the SQL database language. An “inference engine” executes a programme that answers a query by searching these relations systematically to make inferences that will answer a query. PROLOG has been widely used in natural language processing and other AI applications.

Functional languages are written in a mathematical style. By applying functions to arguments, a functional programme is created. LISP, ML, and Haskell are functional languages that are used as research tools in language development, automated mathematical theorem provers, and some commercial projects.

 

Scripting Languages

 

Scripting languages are also known as little languages. They are intended to solve relatively small programming problems that do not necessitate the overhead of data declarations and other features required to manage large programmes. Scripting languages are used to create operating system utilities, special-purpose file-manipulation programmes, and, because they are simple to learn, even much larger programmes.

 

Perl Programming Language

It was created in the late 1980s for use with the UNIX operating system. It was designed to have all of the features of previous scripting languages. Perl provided numerous ways to express common operations, allowing a programmer to use any convenient style. It gained popularity as a system-programming tool in the 1990s, both for small utility programmes and for prototypes of larger ones. It became popular for programming computer Web “servers” alongside other languages discussed below.

 

Document Formatting Languages

 

Document formatting languages define how printed text and graphics should be organised. They are classified into three types: text formatting notation, which can perform the same functions as a word processing programme, page description languages, which are interpreted by a printing device, and markup languages, which describe the intended function of portions of a document.

 

TeX Programming Language

TeX was created as a text formatting language by Donald Knuth, a Stanford University professor, between 1977 and 1986 in order to improve the quality of mathematical notation in his books. Unlike WYSIWYG (“What You See Is What You Get”) word processors, text formatting systems embed plain text formatting commands in a document, which are then interpreted by a language processor to produce a formatted document for display or printing. TeX, for example, marks italic text as it this is italicised, which is then displayed as this is italicised.

Earlier text formatting languages were largely replaced by TeX. Its powerful and adaptable capabilities gave an expert precise control over things like font selection, table layout, mathematical notation, and the inclusion of graphics within a document. It is typically used in conjunction with “macro” packages, which define simple commands for common operations such as starting a new paragraph; LaTeX is a popular package. TeX includes a number of standard “style sheets” for various types of documents, which can be further customised by the user. There are also related programmes such as BibTeX, which manages bibliographies and includes style sheets for all common bibliography styles, as well as TeX versions for languages with different alphabets.

 

PostScript Programming Language

PostScript is a page-description language developed by Adobe Systems Incorporated in the early 1980s on the basis of research at Xerox PARC (Palo Alto Research Center). Such languages describe documents in terms that a personal computer can interpret and display on its screen, or by a microprocessor in a printer or typesetting device.

PostScript commands, for example, can precisely position text in a variety of fonts and sizes, draw mathematically described images, and specify colour or shading. PostScript employs postfix, also known as reverse Polish notation, in which the name of an operation is followed by its arguments. Thus, “300 600 20 270 arc stroke” means: draw a 270-degree arc with radius 20 at location “300 600 20 270 arc stroke” (300, 600). Although a programmer can read and write PostScript, it is typically generated by text formatting programmes, word processors, or graphic display tools.

PostScript’s success can be attributed to the fact that its specification is open source and that it works well with high-resolution laser printers. It has influenced the development of printing fonts, and a wide range of PostScript fonts are available from manufacturers.

 

SGML Programming Language

SGML (standard generalised markup language) is a metalanguage that is an international standard for the definition of markup languages. Markup is made up of tags, which specify the function of a piece of text or how it should be displayed. SGML emphasises descriptive markup, such as “emphasis>” tags. This type of markup denotes the document function and can be interpreted as reverse video on a computer screen, typewriter underlining, or italics in typeset text.

DTDs are specified using SGML (document type definitions). A DTD defines a type of document, such as a report, by specifying what elements must appear in the document—for example, Title>—and by providing rules for the use of document elements, such as that a paragraph may appear within a table entry but not within a paragraph. A parsing program can examine marked-up text to see if it conforms to a DTD. Another program may read the markups in order to create an index or to convert the document to PostScript for printing. Another might generate large type or audio for readers who are blind or deaf.

No Comments

Post A Comment

This will close in 20 seconds