#45 null list printing

closed-fixed
5
2008-03-16
2008-03-16
futurdorko
No

Just a little bug in list printing. When declaring a null list, gretl prints out all the variable in the dataset if the print command is invoked on the list.

Example.

<i>
nulldata 10

x = uniform()
y = uniform()

list lista = null #like it was lista = dataset

print lista

lista # this works

</i>

Discussion

  • Allin Cottrell
    Allin Cottrell
    2008-03-16

    • assigned_to: nobody --> allin
    • status: open --> closed-fixed
     
  • Allin Cottrell
    Allin Cottrell
    2008-03-16

    Logged In: YES
    user_id=330339
    Originator: NO

    Not totally clear this is a bug, because "print" with no arguments
    is supposed to print the entire dataset. The question is whether
    giving a null list is or is not the same as "giving no arguments".

    However, I can see a case for treating a null list differently.
    For consistency, I have applied the change to all commands that
    default to the entire dataset, with the exception of "store".
    Supplying a null list will make these commands a no-op, apart
    from store, where it will generate an error.