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
MAD (programming language)
(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!
== Operator definition and redefinition == One of the most interesting features in MAD is the ability to extend the language by redefining existing operators, defining new operators, or defining new data types (modes). The definitions are made using MAD declaration statements and assembly language mnemonics included following the declaration up to the END pseudo-instruction that implement the operation. * DEFINE BINARY OPERATOR ''defined-op'', PRECEDENCE ''rank'' ''existing-op'' MODE STRUCTURE ''mode-options'' * DEFINE UNARY OPERATOR ''defined-op'', PRECEDENCE ''rank'' ''existing-op'' MODE STRUCTURE ''mode-options'' * MODE STRUCTURE ''mode-no'' = ''mode-no'' ''existing-op'' ''mode-no'' * MODE STRUCTURE ''mode-no'' = ''mode-no'' ''existing-op'' ''mode-no'' SAME SEQUENCE AS ''mode-no'' ''existing-op'' ''mode-no'' where: * ''rank'' is one of SAME AS, LOWER THAN, or HIGHER THAN; and * ''mode-options'' are the options that appear on the MODE STRUCTURE statement. Three pre-defined packages of definitions (MATRIX, DOUBLE PRECISION, and COMPLEX) are available for inclusion in MAD source programs using the INCLUDE statement. * INCLUDE ''package''
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)