How to programmatically edit a field? I have a type node called flat, a field called latitude. I want to update the value of this field in a module each time the node is updated.

I try to use the hook_node_update() but nothing happens :

function flat_node_update($node){
    print_r($node);  
    return $node;
}


Do you have the answer?
hook_node_update() is called after the node has been updated.

You want hook_node_presave() instead. If the nid is not empty, it is an update.