Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Off-side rule
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Programming language syntax rule that defines code block demarcation via indentation}} {{About|the programming language syntax feature||Offside (disambiguation)}} {{Refimprove|date=December 2011}} {{Use mdy dates|date=July 2022}} The '''off-side rule''' describes [[Syntax (programming languages)|syntax]] of a [[computer]] [[programming language]] that defines the bounds of a [[block (programming)|code block]] via [[indent style|indentation]].<ref> {{cite conference | first= G. | last= Hutton | editor-first= Kei | editor-last= Davis | editor2-first= John | editor2-last= Hughes | title= Parsing Using Combinators | book-title= Functional Programming: Proceedings of the 1989 Glasgow Workshop 21β23 August 1989, Fraserburgh, Scotland | pages= 362β364 | publisher= Springer Science & Business Media | date= Dec 6, 2012 | isbn= 9781447131663 | url= https://books.google.com/books?id=GiLjBwAAQBAJ&dq=offside+rule+programming&pg=PA363 | access-date= September 3, 2015}} </ref><ref> {{cite conference | first= D.A. | last= Turner | editor-first= Hans Wolfgang | editor-last= Loidl | editor2-first= Ricardo | editor2-last= PeΓ±a | title= Some History of Functional Programming Languages (Invited Talk) | book-title= Trends in Functional Programming: 13th International Symposium, TFP 2012, St Andrews, UK, June 12β14, 2012, Revised Selected Papers | pages= 8 | publisher= Springer | date= August 13, 2013 | isbn= 9783642404474 | url= https://books.google.com/books?id=B_25BQAAQBAJ&dq=Offside+rule+programming&pg=PA8 | access-date= September 3, 2015}}</ref> The term was coined by [[Peter Landin]], possibly as a pun on the [[Offside (association football)|offside law]] in [[association football]]. An off-side rule language is contrasted with a [[free-form language]] in which indentation has no syntactic meaning, and indentation is strictly a matter of [[Programming style|style]]. An off-side rule language is also described as having '''significant indentation'''.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)