This programming language may be used to instruct a computer to perform a task.
|Execution method:||Compiled (machine code)|
|Parameter passing methods:||By value|
Draco is an imperative programming language written in the mid-1980s by Chris Gray. The language was written to combine the strengths of (1980s-era) C and Pascal, while avoiding what the author saw as weaknesses. The syntax is strongly ALGOL 68 influenced.
Draco is meant to be suitable for systems programming, and thus includes such C features as bitwise operators, pointer manipulation, signed and unsigned types, and conditional compilation, while also including Pascal-style strict typing, typed constants, and Pascal-inspired syntax meant to avoid common C pitfalls. Draco also includes some improvements of its own, such as the ability to pass variable-length arrays to functions, and even operator overloading of a kind.
Draco is also meant to run efficiently on microcomputers of the 1980s. To this end, Draco will always do math and pass parameters using the smallest possible type. Draco includes the ability to define numeric types by bounding them explicitly at compile time. Unlike Pascal, this limit is not enforced at runtime, but the compiler will select the smallest integer size that fits the given range. It is also possible to declare procedures to be "nonrecursive", which means those procedures do not use a stack frame, but instead allocate all their local variables statically. This makes the generated machine code more efficient.
Draco is also the name of the compiler, also written by Chris Gray. A CP/M and Amiga version are available (both will run on an emulator on a modern system). The compiler is self-hosted, and comes with a linker, an editor, a set of standard libraries, documentation and example code. While the compiler was originally distributed as shareware, Chris Gray is now offering both versions, as well as the source code, as a free download on his website.
This category has only the following subcategory.
Pages in category "Draco"
The following 100 pages are in this category, out of 100 total.
- Sierpinski triangle
- Sieve of Eratosthenes
- Smallest square that begins with n
- Smith numbers
- Sort the letters of string in alphabetical order
- Sorting algorithms/Bubble sort
- Sorting algorithms/Heapsort
- Steady squares
- Strange numbers
- Strange plus numbers
- Strip a set of characters from a string
- Sum of first n cubes
- Sum of squares
- Sum of the digits of n is substring of n