How would i write this in F# or another functional language

Posted by acidzombie24 on Stack Overflow See other posts from Stack Overflow or by acidzombie24
Published on 2010-03-09T11:18:38Z Indexed on 2010/03/09 11:21 UTC
Read the original article Hit count: 120

Filed under:

I know in F# you declare variables when you assign them. I'm sure you can declare vars in a C way but how might i write this

long id=0
using (SQLiteDataReader r = command.ExecuteReader())
{
    while (r.Read())
    {
        id = r.GetInt64(0);
        //...
        break;
    }
}
//use id in sqlite now that it isnt locked

© Stack Overflow or respective owner

Related posts about F#