convert character to integer - Fortran

This is a discussion on convert character to integer - Fortran ; hi, i have no programming background and still new in using fortran. i was given task: to convert character data to integer data. the character data is "31/12/2009", which is from csv file. i need to convert it to 31122009. ...

+ Reply to Thread
Results 1 to 2 of 2

convert character to integer

  1. Question convert character to integer

    hi,
    i have no programming background and still new in using fortran. i was given task: to convert character data to integer data. the character data is "31/12/2009", which is from csv file. i need to convert it to 31122009. the csv file looks like the following:

    "31/12/2008",-999,-999,1.2,1.4,18.6,17.6,0.6,0.6,-999,-999,9.6,9.400001,-999,-999,1.8,1.8,1.6,1.8,2.2,2.4,-999,-999,0,0.2,1.2,1,-999,-999,,

    so, any help?

  2. Default Re: convert character to integer

    If every cvs file is structed with 'dd/mm/yyyy' then you could just read in the first 10 characters into a temporary array. Then have a loop go look threw the array and if the character equals 0-9 put it into chacter array. From there you should be able to use a character to integer function

+ Reply to Thread

Similar Threads

  1. convert character to integer
    By lovemaths in forum Fortran
    Replies: 0
    Last Post: 06-03-2010, 02:39 AM
  2. newbie: mapping CHARACTER*2 to INTEGER*2
    By Application Development in forum Fortran
    Replies: 5
    Last Post: 05-22-2008, 06:15 AM
  3. check and convert lower character to upper character
    By Application Development in forum c++
    Replies: 3
    Last Post: 11-18-2007, 06:28 AM
  4. Script that can convert character attribs to character stylesheets
    By Application Development in forum Adobe Indesign
    Replies: 16
    Last Post: 01-25-2007, 11:44 AM
  5. JS - CS2 - Win: How change character variable to integer
    By Application Development in forum Adobe Indesign
    Replies: 2
    Last Post: 09-15-2006, 01:03 PM