Jump to content

Line (text file): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Bodigami (talk | contribs)
No edit summary
+use +more citations needed ce
Tags: Mobile edit Mobile web edit Advanced mobile edit
 
(16 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{short description|Subdivision of a text file}}
{{Unreferenced|date=May 2008}}
{{Use American English |date=February 2024}}
{{Use mdy dates |date=February 2024}}
{{More citations needed |date=February 2024}}
In [[computing]], a '''line''' is a unit of organization for [[text files]]. A line consists of a sequence of zero or more [[Character (computing)|characters]], usually displayed within a single horizontal sequence.


The term comes directly from physical printing, where a '''line of text''' is a horizontal row of characters.
In [[computing]], a '''line''' is a unit of organization for [[text files]]. A line consists of a sequence of zero or more [[characters]]. Depending on the [[file system]] being used the number of characters on a line may be fixed (e.g., at 80 characters on some [[IBM]] [[operating systems]]) or may vary with the end of each line being denoted by one or more special characters.


Depending on the [[file system]] or [[operating system]] being used the number of characters on a line may either be predetermined or fixed, or the length may vary from line to line. Fixed-length lines are sometimes called [[Storage record|records]]. With variable-length lines, the end of each line is usually indicated by the presence of one or more special [[end-of-line]] characters. These include [[line feed]], [[carriage return]], or combinations thereof.<ref name="duc18" />
Some tools that operate on text files (e.g., editors) provide a mechanism to reference lines by their [[line number]].


A '''blank line''' usually refers to a line containing zero characters (not counting any end-of-line characters); though it may also refer to any line that does not contain any visible characters (consisting only of [[Whitespace character|whitespace]]).

Some tools that operate on text files (e.g., [[text editor|editors]]) provide a mechanism to reference lines by their [[line number]].

== See also ==
* [[Newline]]
* [[Line wrap and word wrap]]
* [[Line-oriented programming language]], programming languages that interpret the end of line to be the end of an instruction or statement
[[Category:Computer file formats]]
[[Category:Computer file formats]]
[[Category:Computer data]]
[[Category:Computer data]]


== References ==
[es:Línea de código fuente]]
{{reflist |refs=

<ref name="duc18">{{cite news |title=Windows Notepad finally understands everyone else's end of line characters |last=Duckett |first=Chris |date=2018-05-09 |publisher=[[ZDNet]] |url=https://www.zdnet.com/article/windows-notepad-finally-understands-everyone-elses-end-of-line-characters/ |access-date=2023-02-10 |url-status=live |archive-url=https://web.archive.org/web/20180513055845/https://www.zdnet.com/article/windows-notepad-finally-understands-everyone-elses-end-of-line-characters/ |archive-date=2018-05-13 }}</ref>
{{compu-stub}}
}}

Latest revision as of 05:10, 10 February 2024

In computing, a line is a unit of organization for text files. A line consists of a sequence of zero or more characters, usually displayed within a single horizontal sequence.

The term comes directly from physical printing, where a line of text is a horizontal row of characters.

Depending on the file system or operating system being used the number of characters on a line may either be predetermined or fixed, or the length may vary from line to line. Fixed-length lines are sometimes called records. With variable-length lines, the end of each line is usually indicated by the presence of one or more special end-of-line characters. These include line feed, carriage return, or combinations thereof.[1]

A blank line usually refers to a line containing zero characters (not counting any end-of-line characters); though it may also refer to any line that does not contain any visible characters (consisting only of whitespace).

Some tools that operate on text files (e.g., editors) provide a mechanism to reference lines by their line number.

See also

[edit]

References

[edit]
  1. ^ Duckett, Chris (May 9, 2018). "Windows Notepad finally understands everyone else's end of line characters". ZDNet. Archived from the original on May 13, 2018. Retrieved February 10, 2023.