DG/L

DG/L is a programming language developed by Data General Corp for the Nova, Eclipse, and Eclipse/MV families of minicomputers in the 1970s and early 1980s.

DG/L
ParadigmsMulti-paradigm: procedural, imperative, structured
FamilyALGOL
DeveloperData General
First appeared1978 (1978)
PlatformNova, Eclipse, Eclipse/MV
OSRDOS, AOS, AOS/VS
Influenced by
ALGOL 60

There were two separate versions:

  • "Old" Algol, which ran on and generated code for the Nova series of 16 bit computers. The compiler only did a little optimization. It was only available on the RDOS family of operating systems.
  • DG/L, which was developed by extensively modifying the Fortran 5 optimizing compiler. This compiler ran only on the Eclipse and Eclipse/MV family of computers but generated optimized code for the Nova, Eclipse and Eclipse/MV (Eagle) family. It was available on RDOS, AOS and AOS/VS.

The language itself was an extended version of Algol 60. It supported Integers, Single and Double precision floating point and complex numbers, and both fixed and arbitrary precision strings. It also supported full arbitrary precision binary-coded decimal (BCD) arithmetic on strings. It had many convenient program control flow features, but being designed in the mid 70s, lacked user defined data structures.

DG/L had a substantial runtime library for its day, and was used for systems programming both within and outside of Data General.

Originally called Algol/5, the product renamed DG/L shortly before the first commercial release in 1978. Officially, the name is meaningless but it was apparently supposed to imply "Data General Language". After the first commercial release, targeting 16-bit Eclipse and Nova, several subsequent updates and major versions were released, approximately one a year.

Comparison with Algol 60

Appendix A of Data General's 1982 revision of its DG/L Language Reference Manual, 093-00229-01 describes DG/L as based on the ALGOL 60 programming language, but gives "data types, operations and statements that ALGOL 60 lacks". Specific differences are:

Algol 60 features unsupported in DG/L

Algol 60 featureAs described in Algol 60 report[1] paragraphDG/ notes
Call by namepara. 4.7.3.2DG/L allows procedure parameters as type PROCEDURE, allowing procedures to be passed by name to other procedures.
Nested quotation marks in literals2.6.1 and 2.4.1
No limit on length of identifiersDG/L identifier names need to be unique within the first 32 characters
Two division operators3.3.4.2DG/L uses "/" for both real and integer division; an integer divided by another integer implies integer division (e.g. 1/4 is 0) unless the compiler's global /R switch is used
Notation of 10 <integer>2.5.1DG/L uses E <integer> (or D <integer> for double precision) for "scientific" notation to show powers of ten
A program consisting only of a <compound statement>4.1.1
Non-ASCII characters ⋀,⋁,¬,⊃,≡,≤,≥,≠ as Boolean operators3.4.6.1DG/L allows instead: AND, OR, NOT, IMP, EQV, <= (or =<),>= (or =>), and <> (or ><) as well as XOR
Including non-Algol code within Algol procedures4.7.8Apart from the FORTRAN 5 math library, documentation for external procedures assumes only other DG/L procedures will be linked in.

Extensions

Some of the extensions to the Algol 60 standard introduced in DG/L or carried over from Data General's previous Algol implementation of 1971:

String Operations

  • SUBSTR - substring
  • INDEX - position of a substring
  • LENGTH - length of a string
  • SETCURRENT - sets the current length of a string, e.g. setcurrent(str,length(str)-1);
  • Concatentation operator: "!!"
  • String arithmetic (e.g. "123.45" + "0.01" )
  • Type conversion (Boolean, Integer, Real, Pointer, Bit)
  • Octal numbers and some special symbols enclosed in brackets to represent ASCII characters

Input and Output

  • Fully formatted output, unformatted input, and output for all supported data types
  • Full interface to Data General's RDOS, AOS and AOS/VS system calls
  • Cache memory management (with virtual memory option).
  • Interface to CLRE and INFOS II databases

Other Extensions

  • Conditional compiling of sections of code, using /**letter-digit-string <statement> */
  • end-of-line comments using the % character and /* comment */
  • expanded do, for, and if syntax (e.g. WHILE <boolexp1> DO <statement> UNTIL <boolexp2> )
  • Types: BIT, BYTE, 16-bit and 32-bit integers, 32-bit and 64-bit reals and arbitrary precision arithmetic,
  • Literals, e.g. LITERAL C (299792.458)
  • Global data
  • Error trapping
  • External procedures and data
  • Cluster declaration... very similar to Pascal units (allows a cluster of procedures and data in a separate compiled source).
  • Pointer -> symbol and BASED variables of all types
  • Exclusive-OR operator (XOR)
  • Multitasking
gollark: They're also quite complicated?
gollark: Lots of kernels appear to now contain code which is *not* very low-level and doesn't really need to run in ring0 but which is nevertheless there and written in C.
gollark: Further evidence of C bad‽
gollark: Yes, manjaro is utterly.
gollark: I mean, now we know Sonata's ALLOCATES MEMORY!

References

  1. Naur, Peter (Jan 1963). "Revised Report on the Algorithmic Language ALGOL 60". Communications of the ACM. 6: 1–17. doi:10.1145/366193.366201.
  • DG/L Compiler Reference Manual, Data General Corp, 1978
  • DG/L Runtime Reference Manual, Data General Corp, 1978
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.