Code requiring the RFXM bank needs to define the COMMON holding LARFXM and also the INCLUDE file mt.inc which defines the special ZEBRA xCONS memory holding titles banks in the array ICONS and RCONS:-
INCLUDE 'mt.inc' COMMON/MYCOMM/ LARFXM(8) INTEGER LRFXM,LDRFXM EQUIVALENCE (LARFXM(6),LRFXM), (LARFXM(7),LDRFXM)Next a request to manage the RFXM 1 is required (the code should only be executed once - it won't hurt if done more often but will waste time):-
* Declare the size of the area to hold user data to be zero * to prevent user data from being copied to the COMMON. LARFXM(8) = 0 * Declare the request level: = 1 optional, = 2 compulsory. IREQ = 1 * Ask for management. SU_ID is the SU's ID e.g. KSU_MCO. CALL MT_REQUEST_TITLES('RFXM',1,IREQ,LARFXM,SU_ID)
MT_REQUEST_TITLES looks for the RFXM bank and sets up the pointers LRFXM and LDRFXM. If the system cannot find the bank, but it is optional, it will return with LRFXM and LDRFXM set to zero. So the user can now get to the user data via the link LDRFXM e.g.:-
IF (LRFXM .NE. 0) THEN NRFXM = ICONS(LDRFXM+1) WRITE(IQPRNT,90000) NRFXM, (RCONS(LDRFXM+1+JRFXM), + JRFXM = 1, NRFXM) ENDIF 90000 FORMAT(' The RFXM banks contains',I5,' media.',/, + ' The refractive indices are:- ',/, + (' ',F10.5))The system will update the links as necessary - don't make private copies or do something like:-
LRFXMN = LDRFXM + 1 + Nand then access RCONS(LRFXMN); sooner or later the bank could move and you would be in trouble!