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
BLISS
(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!
== Language description == {{long quote|date=June 2020}} {{quote|BLISS has many of the features of other modern high-level languages. It has block structure, an automatic stack, and mechanisms for defining and calling recursive routines ... provides a variety of predefined data structures and ... facilities for testing and iteration ... On the other hand, BLISS omits certain features of other high-level languages. It does not have built-in facilities for input/output, because a system-software project usually develops its own input/output or builds on basic monitor I/O or screen management services ... it permits access to machine-specific features, because system software often requires this. BLISS has characteristics that are unusual among high-level languages. A name ... is uniformly interpreted as the address of that segment rather than the value of the segment ... Also, BLISS is an "expression language" rather than a "statement language". This means that every construct of the language that is not a declaration is an expression. Expressions produce a value as well as possibly causing an action such as modification of storage, transfer of control, or execution of a program loop. For example, the counterpart of an assignment "statement" in BLISS is, strictly speaking, an expression that itself has a value. The value of an expression can be either used or discarded in BLISS ... Finally, BLISS includes a macro facility that provides a level of capability usually found only in macro-assemblers.|''Bliss Language Manual'', [[Digital Equipment Corporation]] (1987)<ref name=Manual>[http://www.digiater.nl/openvms/freeware/v80/bliss/documentation/blslref.pdf Bliss Language Manual], [[Digital Equipment Corporation]] (1987)</ref>}} The BLISS language has the following characteristics: * All ''constants'' are full word for the machine being used, e.g. on a 16-bit machine such as the [[PDP-11]], a constant is 16 bits; on a [[VAX]] computer, constants are 32 bits, and on a [[PDP-10]], a constant is 36 bits. * A ''reference to a variable'' is always to the address of that variable. For example, the instruction <code>Z+8</code> refers to adding 8 to the ''address'' of Z, not to its ''value''. If one needs to add 8 to the ''value'' of Z, one must prefix the variable with a period; so one would type <code>.Z+8</code> to perform this function, which adds 8 to the ''contents'' of Z. * ''Assignment'' is done with the standard <code>=</code> symbol, e.g. <code>Z=8</code> – which says to create a full-word constant containing 8, and store it in the location whose address corresponds to that of Z. So <code>Z+12=14</code> (or, alternatively <code>12+Z=14</code> though this form is considered bad practice per the BLISS documentation in Digital) places the constant 14 into the location which is 12 words after the address of Z. * ''Block statements'' are similar to those of [[ALGOL]]: a block is started with a <code>BEGIN</code> statement and terminated with <code>END</code>. As with ALGOL, statements are separated with the semicolon (";"). When a value is computed, it is saved until the next statement terminator – which means that a value can be computed, assigned to a variable, and carried forward to the next statement, if desired. Alternatively, an open parenthesis may be used to begin a block, with the close parenthesis used to close the block. When parentheses are included in an expression, the standard [[Order of operations|precedence]] rules are used, in which parenthesized expressions are computed first, * ''Conditional execution'' uses the <code>IF</code> expression, which tests a true-false condition, performs alternative actions, and returns a result. * ''Comparison'' uses keywords such as <code>EQL</code> for equality (as opposed to [[operator overloading|overloading]] the = symbol for the same purpose), <code>GTR</code> for Greater Than, and <code>NEQ</code> for not equal. For example, the following code will assign the absolute value of Z to the address indicated by Q: ::<code>Q = (IF .Z GTR 0 THEN .Z ELSE -.Z);</code> * ''Identifiers'' (variables and constants) must be declared before use, typically using the <code>OWN</code> keyword. Declaring a variable normally causes the compiler to allocate space for it; when necessary, a variable may be assigned a fixed machine address via the <code>BIND</code> declaration. This feature is primarily used for accessing either machine registers or certain special addresses. * ''[[Subroutine]]s'' in the language are called ''routines'', and are declared with the keyword <code>ROUTINE</code>. * ''Macros'', which allow for text substitution, are declared with the keyword <code>MACRO</code>. * The language supports ''[[Array data structure|arrays]]'', which are referred to as ''structures'', and declared with the keyword <code>VECTOR</code>. * The language supports some ''[[high-level programming language]] constructs'' such as: **''Alternative execution paths'' via the <code>CASE</code> expression **''Looping'' through use of the <code>INCR</code> expression, which is similar to ALGOL's FOR statement **Built-in ''[[String (computer science)|string]] functions'' **Certain automatic ''data conversions'' (number to string, etc.)
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)