Hello,
Please can anyone tell me the meaning of this;
propty1 = propty(1:np)//'EXP'
Please note that propty and propty1 are of type character.
Does it mean that if propty is 'SOMETHING' then propty1 will be 'SOMETHINGEXP'??
Please help
Welcome to our forums
Hello,
Please can anyone tell me the meaning of this;
propty1 = propty(1:np)//'EXP'
Please note that propty and propty1 are of type character.
Does it mean that if propty is 'SOMETHING' then propty1 will be 'SOMETHINGEXP'??
Please help
YES. But - why don't you test it?
PROGRAM TEST
character*120 propty,propty1
propty = 'hello_dolly'
propty1 = propty(1:6)//'anne'
print*,propty1
end
Regards - Wilfried
Yes, but only if np = 9. If np is less that 9, say 4, you will get 'SOMEEXP'.
I suspect that your fragment of code is taking a filename and adding an extension. It may well be a filename with a path and a driveletter as well. Just guessing, but is np calculated from
np=LEN_TRIM(PROPTY)
If PROPTY was a proper filename already with an extension, then you might have to knock off up to 3 characters to get rid of that. Another way would be to read back from the end of the character string until you came to the dot. FTN95 has SET_SUFFIX@ and SET_SUFFIX1@ library routines for doing this job with less things to think about.
The // concatenation operator is particularly useful for splicing in invisible characters, e.g. //CHAR(10)//
Eddie