{{language
|exec=machine
|gc=no
|safety=safe
|parampass=value
|checking=static
|compat=nominative
|express=explicit
|strength=strong
}}
{{language programming paradigm|Imperative}}
{{implementation|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. 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.

==Resources==
*[http://www.graysage.com/cg/Compilers/index.html Chris Gray's Compilers page, where the Draco compiler can be found.]

==See Also==
*[[Action!]]: a somewhat similar, but less advanced language, which targets the 6502.
*[[ALGOL 68]]: the language on which much of the syntax is based.
*[[Cowgol]]: a more modern language also targeting small systems, which is under active development, and shares many of the same design goals as Draco.