Directive (programming) - in Other High-level Languages

In Other High-level Languages

In Ada, compiler directives are called pragmas (short for "pragmatic information").

In Turbo Pascal, directives are called significant comments, because in the language grammar they follow the same syntax as comments. In Turbo Pascal, a significant comment is a comment whose first character is a dollar sign and whose second character is a letter; for example, the equivalent of C's #include "file" directive is the significant comment {$I "file"}.

In Perl, the keyword "use" can introduce a "pragma", such as use strict; or use utf8;. ECMAScript also uses this keyword to introduce "pragmas".

In Visual Basic, the statement "Option Explicit On" instructs the VB compiler to require all variable declarations before use. There are also a few other variations to the Option keyword, such as:

  • Option Strict On - Requires that implicit type casts are only to wider types.
  • Option Compare Binary - Tells the compiler to compare text using a binary algorithm.
  • Option Compare Text - Tells the compiler to compare text using a textual algorithm.

Read more about this topic:  Directive (programming)

Famous quotes containing the word languages:

    Wealth is so much the greatest good that Fortune has to bestow that in the Latin and English languages it has usurped her name.
    William Lamb Melbourne, 2nd Viscount (1779–1848)