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
String literal
(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!
=== Declarative notation === In the original [[FORTRAN]] programming language (for example), string literals were written in so-called [[Hollerith constant|''Hollerith'' notation]], where a decimal count of the number of characters was followed by the letter H, and then the characters of the string: <syntaxhighlight lang="fortran">35HAn example Hollerith string literal</syntaxhighlight> This declarative notation style is contrasted with bracketed [[delimiter]] quoting, because it does not require the use of balanced "bracketed" characters on either side of the string. '''Advantages:''' * eliminates text searching (for the delimiter character) and therefore requires significantly less [[Computational overhead|overhead]] * avoids the problem of [[delimiter collision]] * enables the inclusion of [[metacharacter]]s that might otherwise be mistaken as commands * can be used for quite effective data compression of plain text strings{{citation needed|reason=doesn't look like compression to me|date=March 2011}} '''Drawbacks:''' * this type of notation is error-prone if used as manual entry by [[programmer]]s * special care is needed in case of multi byte encodings This is however not a drawback when the prefix is generated by an algorithm as is most likely the case.{{citation needed|reason=humans don't generally write Fortran code, or what? we're talking source code formats, after all...|date=February 2012}}
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)