I do not find similar functions in gFortran :
call lcase@ (text) call trim@ (text)
Text is character variable (in my case character*256).
I know there exist simple programs to do the same
Welcome to our forums
I do not find similar functions in gFortran :
call lcase@ (text) call trim@ (text)
Text is character variable (in my case character*256).
I know there exist simple programs to do the same
As the FTN95 documentation tells you, you can use the standard intrinsic ADJUSTL instead of TRIM@. For LCASE@, unless you want to convert the entire works of Shakespeare to lower case, the following code should suffice as a replacement.
program tlcase
implicit none
character*20 :: mstr = 'abcdEFGHijklmN12Qr@#'
call toLower(mstr)
print 10,mstr
10 format(' |',A,'|')
end program
subroutine toLower(str)
implicit none
character(*), intent(in out) :: str
integer*1 itmp(len(str))
integer*1, parameter :: i32 = 32
itmp = transfer(str,itmp)
str = transfer(merge(IOR(itmp,i32), itmp, &
65 <= itmp .AND. itmp <= 90), str)
return
end subroutine
Brain crushing solution, thanks mecej4. Mathematics is foundation of everything 😃
But what also happened with LCASE@ in FTN95 9.0+ ? Was it dropped from the compiler? This makes some older codes broken
Dan
I don't know of any problems with LCASE@. Can you provide details and sample code?
Paul, It behaves a bit unexpectedly, not that it is unsupported in Ver9 but better say kind of lost backward compatibility. If i create an example and compile it with Ver9 all works fine. But if compile with older compilers and run under Ver9 it freezes or crash.
character*256 text
Text='QWERTY'
print*,trim(text)
call lcase@(text)
print*,trim(text)
end
Dan
If you compile using an older FTN95 and run using the latest Silverfrost DLLs then it may well crash.
lcase can crash Clearwin? 😒hock: 😒hock: 😒hock:
Dan, many of the 64-bit RTL routines (such as lcase@, dot_product8@, etc.) are in CLEARWIN64.DLL rather than in SALFLIB64.DLL. Just today I posted a bug report ( http://forums.silverfrost.com/viewtopic.php?p=34982#34982 ) for dot_product8@, and the demonstrator did not use any CLEARWIN features.
Are CLEARWIN64.DLL and SALFLIB64.DLL provided by the different companies?
CLEARWIN64.DLL and SALFLIBC64.DLL are provided by Silverfrost and are companion DLLs for 64 bit FTN95, SCC and SLINK64.
For 32 bits there is just one DLL which is salflibc.dll but for 64 bits CLEARWIN64.DLL and SALFLIBC64.DLL replace salflibc.dll.
I forgot to put the smile or irony in my last post. I meant what happened with lcase in Ver9 which abruptly started to hiccup after 30 years of previous no problem upgrades ?
Dan
A cure for hicups is to hold your breath for a long time. Long enough to remember to keep compiler and DLL versions in step.
Paul, Looks like the devilry now found your computers too 😛 In October in this forum we discussed lcase@ and 3 days later FTN95 Ver.9.0 appeared
I downloaded it in November, installed it on new drives in Linux, in Windows, and when launched my codes they even did not start.
I informed you about two problems with Ver9,0 and got new FTN95. It cured one of them and did not fix lcase@ with you just commented that you can not do anything with it (???). How one can interpret that and how 'my breath' and 'in step' can fix the issue?
New compiler broke backward compatibility. May be i missed something and you meantime fixed it? No, after that I found new and the only latest DLLs since i reported this bug, i installed them and the problem is still there.
Should i interpret 'i can not do anything with it' that now i have to dig into ages and find older compilers' with their Salflibc64 and Clearwin64 to run older codes? 35 years all older codes worked fine with new versions of FTN95.
What, the FTN95 still does not attach needed libraries to EXE? Is this to advertise that FTN95 has one 'huge advantage' of having smallest EXE files to fit them into 1.44MB 2.5' floppy drives?
Dan
I tried to explain that you can't normally use an old version of FTN95 with later (dated) versions of the Silverfrost DLLs.
I will send you the latest FTN95 with compatible DLLs off my machine (probably on Monday). If you use them together then your problems should be solved.