- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a command to convert a character string into a Real number string? If the variable X is initialized as a character and contains the character "3", how do I change it so that "X" is now a real variable containing the number "3"?
thanks.
thanks.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can't have the same variable be both a character string and a numeric, but you can do something like this:
READ (XSTRING,*) X
where XSTRING is a CHARACTER variable containing the string "3" and X is a REAL variable. This is called "Internal READ" - look it up in the Compaq Fortran Language Reference Manual.
Steve
READ (XSTRING,*) X
where XSTRING is a CHARACTER variable containing the string "3" and X is a REAL variable. This is called "Internal READ" - look it up in the Compaq Fortran Language Reference Manual.
Steve

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page