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
High Level Assembly
(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!
=== Macro system === HLA's compile-time language allows easy extension of the language, even enabling the creation of small [[domain-specific language]]s to simplify common programming problems. The macro <code>stdout.put</code> is a good example of a sophisticated macro that can simplify programming. Consider the following invocation of that macro: <code>stdout.put( "I=", i, " s=", s, " u=", u, " r=", r:10:2, nl );</code> The stdout.put macro processes each argument to determine its type and then calls an appropriate procedure in the HLA Standard Library to handle the output of each operand. Most assemblers offer some macro capabilities. HLA's advantage over other assemblers is its ability to process macro arguments like <code>r:10:2</code> using HLA's extensive compile-time string functions. HLA's macro facilities can also infer variable types and use that information to direct macro expansion. HLA's macro language provides a special ''Context-Free'' macro facility. This feature allows easy writing of macros that span other code sections via a ''starting'' and ''terminating'' macro pair (along with optional ''intermediate'' macro invocations available only between the start–terminate macros). For example, one can write a fully recursive-nestable SWITCH–CASE–DEFAULT–ENDSWITCH statement using this macro facility. Because of the HLA macro facilities' context-free design, these switch..case..default..endswitch statements can be nested without conflicting code emission.
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)