Art Celestini wrote:
Many years ago, I had similar disdain for the use of literals. But, as I wrote
more and more code that I knew would be handed over to others to support and
maintain, I came to realize that defining my constants "in-line" often
contributed to making that code a little easier for the next guy to understand.
The assembler's support for literals to be quite limited. There were
many, many restrictions. For example, older assemblers never would have
allowed you to specify:
MVCIN Eye,=C'abcd'+3
in the first place. Due to these restrictions, many "old schoolers"
developed a strict NO LITERALS policy, even for simple literals like
=F'1' or =D'0'.
Eventually, HLASM provided robust literals support which removed the
rationale for those policies. I remember it well. It was quite liberating!
Literals can do some things ordinary constants cannot. For example, it's
not easy to define a constant that is equivalent to the literal
generated by the following:
LA R1,=A(*)
Without a literal, you need insert a label in the code to make it work.
Ugly!
--
.-----------------------------------------------------------------.
| Edward E. Jaffe | |
| Mgr, Research & Development | [EMAIL PROTECTED] |
| Phoenix Software International | Tel: (310) 338-0400 x318 |
| 5200 W Century Blvd, Suite 800 | Fax: (310) 338-0801 |
| Los Angeles, CA 90045 | http://www.phoenixsoftware.com |
'-----------------------------------------------------------------'
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html