I'm working on modernizing Rosetta Code's infrastructure. Starting with communications. Please accept this time-limited open invite to RC's Slack.. --Michael Mol (talk) 20:59, 30 May 2020 (UTC)

Category:Draco

From Rosetta Code
Language
Draco
This programming language may be used to instruct a computer to perform a task.
Execution method: Compiled (machine code)
Garbage collected: No
Parameter passing methods: By value
Type safety: Safe
Type strength: Strong
Type compatibility: Nominative
Type expression: Explicit
Type checking: Static
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using Draco.
Your Help Needed
If you know Draco, please write code for some of the tasks not implemented in Draco.
Draco is an implementation of Draco. Other implementations of Draco.

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.

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.

Resources[edit]

See Also[edit]

  • Action!: a somewhat similar, but less advanced language, which targets the 6502.
  • Cowgol: a more modern language also targeting small systems, which is under active development, and shares many of the same design goals as Draco.

Subcategories

This category has only the following subcategory.

Pages in category "Draco"

The following 67 pages are in this category, out of 67 total.