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
Delimiter
(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!
== Overview == Delimiters may be characterized as field and record delimiters, or as bracket delimiters. ===Field and record delimiters=== Field delimiters separate data fields. Record delimiters separate groups of fields.<ref name="FldDelm">{{cite book | last = de Moor | first = Georges J. | title = Progress in Standardization in Health Care Informatics | publisher =IOS Press | year = 1993 | isbn =90-5199-114-2}} p. 141</ref> For example, the [[Comma-separated values|CSV format]] uses a comma as the delimiter between [[Field (computer science)|fields]], and an [[end-of-line]] indicator as the delimiter between [[Row (database)|records]]: <pre> fname,lname,age,salary nancy,davolio,33,$30000 erin,borakova,28,$25250 tony,raphael,35,$28700 </pre> This specifies a simple [[flat-file database]] [[Table (information)|table]] using the CSV file format. ===Bracket delimiters=== Bracket delimiters, also called block delimiters, region delimiters, or balanced delimiters, mark both the start and end of a region of text.<ref name="BalaDelm">{{cite book | last = Friedl | first = Jeffrey E. F. | title = Mastering Regular Expressions: Powerful Techniques for Perl and Other Tools | publisher = O'Reilly | year = 2002| isbn = 0-596-00289-0}} p. 319</ref><ref name="Scott000">{{cite book | title = Programming Language Pragmatics | first = Michael Lee | last = Scott | publisher = Morgan Kaufmann | year = 1999 | isbn = 1-55860-442-1 }}</ref> Common examples of bracket delimiters include:<ref name="programmingperl">{{cite book | title=Programming Perl |edition=Third | publisher=O'Reilly |date=July 2000 | isbn=0-596-00027-8 | last1=Wall | first1=Larry | first2=Jon |last2=Orwant | author-link1=Larry Wall | author-link3=Jon Orwant }}</ref> {| class="wikitable" |- ! Delimiters ! style="text-align:left" | Description |- ! <code>(</code> <code>)</code> | [[Bracket#Parentheses|Parentheses]]. The [[Lisp (programming language)|Lisp]] programming language syntax is cited as recognizable primarily by its use of parentheses.<ref name="Kaufmann000">{{cite book | title = Computer-Aided Reasoning: An Approach | first = Matt | last = Kaufmann | publisher = Springer | year = 2000 | isbn = 0-7923-7744-3 }}p. 3</ref> |- ! <code>{</code> <code>}</code> | Braces (also called [[Bracket#Curly brackets|curly brackets]]<ref name="curly_brace_cstyle">{{cite book | last = Meyer | first = Mark | title = Explorations in Computer Science | publisher = Oxford University Press | location = Oxford Oxfordshire | year = 2005 | isbn = 978-0-7637-3832-7 }} references C-style programming languages prominently featuring curly brackets and semicolons.</ref>). |- ! <code>[</code> <code>]</code> | Brackets (commonly used to denote a subscript). |- ! <code><</code> <code>></code> | [[Bracket#Angle brackets|Angle brackets]].<ref name="id_1268443793898_27">{{cite book | last = Dilligan | first = Robert | title = Computing in the Web Age | publisher = Oxford University Press | location = Oxford Oxfordshire | year = 1998 | isbn = 978-0-306-45972-6 }}Describes syntax and delimiters used in HTML.</ref> |- ! <code>"</code> <code>"</code> | commonly used to denote [[string literal]]s.<ref name="id_1268443910269_75">{{cite book | last = Schwartz | first = Randal |author-link=Randal Schwartz | title = Learning Perl | publisher = Oxford University Press | location = Oxford Oxfordshire | year = 2005 | isbn = 978-0-596-10105-3 | url = https://archive.org/details/isbn_9780596101053 }}Describes [[string literal]]s.</ref> |- ! <code>'</code> <code>'</code> | commonly used to denote [[character literal]]s.<ref name="id_1268443910269_75"/> |- ! <code><?</code> <code>?></code> | used to indicate XML [[processing instruction]]s.<ref name="id_1268443998814_32">{{cite book | last = Watt | first = Andrew | title = Sams Teach Yourself Xml in 10 Minutes | publisher = Oxford University Press | location = Oxford Oxfordshire | year = 2003 | isbn = 978-0-672-32471-0 | url-access = registration | url = https://archive.org/details/samsteachyoursel0000watt }} Describes XML processing instruction. p. 21.</ref> |- ! <code>/*</code> <code>*/</code> | used to denote [[comment (computer programming)|comment]]s in some programming languages.<ref name="id_1268444112328_77">{{cite book | last = Cabrera | first = Harold | title = C# for Java Programmers | publisher = Oxford University Press | location = Oxford Oxfordshire | year = 2002 | isbn = 978-1-931836-54-8 }} Describes single-line and multi-line comments. p. 72.</ref> |- ! <code><%</code> <code>%></code> | used in some [[web template]]s to specify language boundaries.<ref>{{cite web|url=https://github.com/jakartaee/pages/blob/master/spec/src/main/asciidoc/ServerPages.adoc#jakarta-server-pages-specification-version-40|title=Jakarta Server Pages Specification, Version 4.0akarta Server Pages Specification, Version 4.0|website=[[GitHub]] |access-date=2023-02-10}}</ref> |} ===Conventions=== Historically, computing platforms have used certain delimiters by convention.<ref>{{cite iso-ir|date=December 1, 1975|number=1|title=The set of control characters for ISO 646||sponsor=ISO/TC 97/SC 2 |sponsor-link=ISO/IEC JTC 1/SC 2#History}}</ref><ref>{{cite iso-ir|date=December 1, 1975|number=6|title=ASCII graphic character set|sponsor=[[American National Standards Institute]]}}</ref> The following tables depict a few examples for comparison. '''Programming languages''' (''See also'', [[Comparison of programming languages (syntax)]]). {| class="wikitable" ! !! String Literal !! End of Statement |- ! Pascal | singlequote || semicolon |- ! Python | doublequote, singlequote || [[end of line]] (EOL) |- |} '''Field and Record delimiters''' (''See also'', [[ASCII]], [[Control character]]). {| class="wikitable" ! !! End of Field !! End of Record !! End of File |- ! [[Unix-like]] systems including [[macOS]], [[AmigaOS]] | [[Tab key|Tab]] || [[Line feed|LF]] || none |- ! [[Windows]], [[MS-DOS]], [[OS/2]], [[CP/M]] | [[Tab key|Tab]] || [[CRLF]] || none (except in CP/M), [[Control-Z]]<ref name="id_1268444696385_5">{{cite book | last = Lewine | first = Donald | title = Posix Programmer's Guide | publisher = Oxford University Press | location = Oxford Oxfordshire | year = 1991 | isbn = 978-0-937175-73-6 | url = https://archive.org/details/posixprogrammers00lewi }} Describes use of control-z. p. 156,</ref> |- ! [[Classic Mac OS]], [[Apple DOS]], [[ProDOS]], [[GS/OS]] | [[Tab key|Tab]] || [[Carriage return|CR]] || none |- ! ASCII/Unicode | [[C0 and C1 control codes#Field_separators|UNIT SEPARATOR]]<br>Position 31 (U+001F) || RECORD SEPARATOR<br>Position 30 (U+001E) || FILE SEPARATOR<br>Position 28 (U+001C) |}
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)