Index: /trunk/FACT++/src/fitsdump.cc
===================================================================
--- /trunk/FACT++/src/fitsdump.cc	(revision 11911)
+++ /trunk/FACT++/src/fitsdump.cc	(revision 11912)
@@ -576,8 +576,20 @@
     out << "## --------------------------------------------------------------------------\n";
     out << "#\n";
-    for (vector<string>::const_iterator it=listNamesOnly.begin(); it!=listNamesOnly.end(); it++)
+    //vector<pair<int, int> >::const_iterator rangesIt = ranges.begin();
+    //the above is soooo yesterday ;) let's try the new auto feature of c++0x
+    auto rangesIt = ranges.begin();
+    for (vector<string>::const_iterator it=listNamesOnly.begin(); it!=listNamesOnly.end(); it++, rangesIt++)
     {
         const MyColumn *col = static_cast<MyColumn*>(fTable->column()[*it]);
-        out << "# " << col->name() << "[" << col->width() << "]: " << col->unit();
+        if (rangesIt->first != 0 || rangesIt->second != col->width())
+        {
+            out << "#";
+            for (int i=rangesIt->first; i<rangesIt->second; i++)
+                out << " " << col->name() << "[" << i << "]";
+            out << ": " << col->unit();
+        }
+        else
+            out << "# " << col->name() << "[" << col->width() << "]: " << col->unit();
+
         if (!col->comment().empty())
             out << " (" <<col->comment() << ")";
