skip to main content
article
Free Access

Indenting for the compiler

Published:01 May 1980Publication History
Skip Abstract Section

Abstract

A simple indentation rule, indent statements from the control statement they belong to, is sufficient to express a program's block structure without the use of compound statements or closing keywords. This is proven using a PASCAL-like language (using indentation instead of BEGIN-END blocks). Using indentation alone means a programmer need not give two independent specifications of a program's block structure, thus reducing effort and eliminating a potential source of errors.

References

  1. Clifton, M. H. "A Technique for Making Structured Programs More Readable," ACM SIGPLAN Notices 13, 4 (April 78), 58--63. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Conrow, K. and Smith, R. G. "NEATER2: A PL/I Source Statement Reformatter, " Comm. ACM 13, 11 (Nov. 70), 669--675. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Crider, J. E. "Structured Formatting of Pascal Programs," ACM SIGPLAN Notices 13, 11 (Nov. 78), 15--22. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Grouse, P. "Flowblocks - A Technique for Structured Programming," ACM SIGPLAN Notices 13, 2 (Feb. 78), 46--56. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Gustafson, G. G. "Some Practical Experiences Formatting Pascal Programs, " ACM SIGPLAN Notices 14, 9 (Sep. 79), 42--49. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Hueras, J. and Ledgard, H. "An Automatic Formatting Program for PASCAL. " ACM SIGPLAN Notices 12, 7 (July 77), 82--84. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Jackson, G. A. "Two Dimensional Grammars and Structured Programming Languages, " ACM SIGPLAN Notices 14, 2 (Feb. 79), 21--28. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Peterson, J. L. "On Formatting of Pascal Programs," ACM SIGPLAN Notices 12, 12 (Dec. 77), 83--86. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Ramsdell, J. "Prettyprinting Structured Programs with Connector Lines," ACM SIGPLAN Notices 14, 9 (Sep. 79), 74--75. Google ScholarGoogle ScholarDigital LibraryDigital Library

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in

Full Access

  • Published in

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 15, Issue 5
    May 1980
    48 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/947639
    Issue’s Table of Contents

    Copyright © 1980 Author

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 1 May 1980

    Check for updates

    Qualifiers

    • article

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader