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
Reduce (computer algebra system)
(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!
=== Statements and expressions === Because REDUCE inherits Lisp semantics, all programming constructs have values. Therefore, the only distinction between statements and expressions is that the value of an expression is used but the value of a statement is not. The terms ''statement'' and ''expression'' are interchangeable, although a few constructs always return the Lisp value <code>nil</code> and so are always used as statements. There are two ways to group several statements or expressions into a single unit that is syntactically equivalent to a single statement or expression, which is necessary to facilitate [[structured programming]]. One is the <code>begin</code>...<code>end</code> construct inherited from ALGOL 60, which is called a ''block'' or ''compound'' statement. Its value is the value of the expression following the (optional) keyword <code>return</code>. The other uses the bracketing syntax <code><<</code>...<code>>></code>, which is called a ''group'' statement. Its value is the value of the last (unterminated) expression in it. Both are illustrated below in the [[#Procedural programming|procedural programming example]] below.
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)