On Feb 16, 2007, at 12:40 PM, Adam Ginsburg wrote:
Is there a way to list what variables have been declared, maybe also
listing their types or some information about them? I swear I found a
command that did this and promptly forgot it.
Adam,
There's 'help vars'
perldl> $a = ones(5,4);
perldl> $b = rvals($a);
perldl> $c = $b->where($b>3)
perldl> ? vars
PDL variables in package main::
Name Type Dimension Flow State Mem
----------------------------------------------------------------
$a Double D [5,4] P 0.16Kb
$c PDL->null
$b Double D [5,4] P 0.16Kb
perldl> $c = $b->where($b>2)
perldl> help vars
PDL variables in package main::
Name Type Dimension Flow State Mem
----------------------------------------------------------------
$a Double D [5,4] P 0.16Kb
$c Double D [8] -C 0.00Kb
$b Double D [5,4] P 0.16Kb
If you have a piddle then you can call its info method to get a string
back (and try '? info' from perldl to see how to customize that info in
more ways than you'd want):
perldl> p $a->info
PDL: Double D [5,4]
HTH,
Doug
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl