Your laptop I would assume is not an IBM Mainframe <g>

No matter how you specify character constants you have to be aware of the 
character set. My big C++ project was "bi-modal": it ran "production" on z/OS 
and limited unit test on Windows. I had to be aware of whether I meant 'A" or 
0xC1 or 0x41 no matter how I wrote the constant. I often meant 
"platform-appropriate A," so 'A' was perfect.

One big use I made of multi-character integers was in the context of C++ 
std::map. I used maps a lot, and if the index were a character value of eight 
characters or less, then it was (I assumed, and yes, I know about assume ...) 
more efficient, certainly in terms of storage and probably in terms of CPU 
time, to have the index be an integer rather than a pointer to a 
null-terminated string. That is map<int, whatever*> rather than map<char*, 
whatever*>. I suspect the former generates simple integer compares while the 
latter generates three loads and a CLST. 

Charles

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to