next up previous contents
Next: FORTRAN Statements Up: Software Previous: Link Variable Names   Contents

Hollerith Constants

Every ZEBRA bank contains its 4 character name at word -4. As the ZEBRA memory array is not of type CHARACTER, testing a bank name this way:-

if ( iq(lbank-4) .eq. 'ABCD' ) then
is illegal and the solution is to either to use the conversion routines INTCHA and CHAINT, or to use the obsolescent hollerith constant feature:-
if ( iq(lbank-4) .eq. 4HABCD ) then
Some compilers, such as g77, object to the use of hollerith in tests like these. The recommended solution is to define a local integer, initialised to the hollerith constant in a DATA statement, and then use that variable to do the test. For example:-
integer  ABCD_4H

data     ABCD_4H / 4HABCD /

...

if ( iq(lbank-4) .eq. ABCD_4H ) then
Hollerith constants are permitted in assignment statements, i.e. the following is O.K.:-
bank_name = 4HABCD



sno Guest Acct 2009-09-09