Re: Converting a string to reals
In fortran it could be something like:
Character F*4
F='b**2'
b=2.0
Y=EVAL(F,b)
where the EVAL function converts the string and sets the value of b.
.
Relevant Pages
- Re: gfortran diagnostics and so on
... Well, in f0003, backslash is part of the standard Fortran character set. ... Because the backslash is part of the standard Fortran character set, the default behavior should be the printable character, **NOT** some kind of magic introductory character that transforms the interpretation of following character. ... The one I like best is to use one of the popular extensions to designate a particular literal string according to the C language. ... (comp.lang.fortran) - Re: Convert Char String "9.8E29" to Real
... Hey Tornado Jeff ... As Steve Kargl pointed out the Fortran way to convert a character ... how to convert a Character string like "9.8E29" to it's Real ... (comp.lang.fortran) - Several questions about character C binding
... I have many questions about character variables passed to a C ... I tested an interface passing a TYPE. ... obligatory the use of the C_LOC function from the FORTRAN side: ... the dimension of the string behind the scene as an additional argument ... (comp.lang.fortran) - Re: Returning a dynamic character array based on input length
... continues beyond my starting string length. ... Is there a way to check whether the line read from the input file is ... "String termination character" isn't the right concept here. ... Fortran ... (comp.lang.fortran) - Proposal: CHARACTER(expr, KIND = ...)
... However, internationalized character string support continues to increase in other languages, so it seems reasonable to expect it in Fortran eventually. ... Unlink simple numeric conversions, it would be good to have an error return indicating how many characters were replaced with the "place holder" character, which would probably be '*' by default, to correspond to erroneous output conversions. ... (comp.lang.fortran) |
|