Subroutine LONGNAME
Maps between external (user defined) and internal group names. Internal group names are limited to seven characters and may not contain spaces. To meet these requirements while avoiding group name duplication requires the change of some group names significantly.
Calling convention:
call longname(sname, lname, id, length, icode)
Arguments | Data type | Input/Output | Description |
---|---|---|---|
sname |
Character*7 | Both | The internal (short) name of the group. |
lname |
Character*80 | Both | The external (long) name of the group. |
id |
Integer | Both | The group number. |
length |
Integer | Both | Length of the long name. |
icode |
Integer | Call | Determines the direction of mapping:
The most common usage is with |
Example:
integer maxgrsize
parameter (maxgrsize=10000)
..
integer aeroheat(maxgrsize)
integer numaero
character*7 sname
integer length, id
..
save aeroheat, numaero
..
C
C Initialization code
C
C Map full group name Aero heating group to internal name
C
call longname(sname,'Aero heating group',id,length,2)
C
C Get list of elements in group
C
call namar(sname,aeroheat, numaero)
if(numaero .gt. maxgrsize) then
print *,' Group AERO_HT contains too many elements'
initerr = .true.
end if
..
Note:
The routine should only be called once. It is therefore necessary to use the
FORTRAN SAVE
statement to preserve the variables between calls.