mjs84
Aerospace
- Aug 20, 2003
- 27
Help....
I am constructing a entity name in and I need to construct the name from strings and integers. This I know how to do, but I don't know how to get the leading zeros. For example:
integer*4 val1
character*3 chr1
character*3 chr2
character*10 ans
val1 = 1
chr1 = 'LST'
write(chr2,*) val1
ans = val1 // chr2 !gives me LST 1
!what I want is:
! LST001
Any help would, as always, be greatly appreciated.
I am constructing a entity name in and I need to construct the name from strings and integers. This I know how to do, but I don't know how to get the leading zeros. For example:
integer*4 val1
character*3 chr1
character*3 chr2
character*10 ans
val1 = 1
chr1 = 'LST'
write(chr2,*) val1
ans = val1 // chr2 !gives me LST 1
!what I want is:
! LST001
Any help would, as always, be greatly appreciated.