user_guide:tutorials:properties

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
user_guide:properties [2019/02/06 18:22] – [Objects] added link to data tut oroehriguser_guide:properties [2019/02/10 12:57] – typeof is now ->type->full_name oroehrig
Line 5: Line 5:
 To find out the type of an object ''$c'', enter To find out the type of an object ''$c'', enter
 <code> <code>
-typeof $c;+print $c->type->full_name;
 </code> </code>
  
Line 101: Line 101:
 What properties //can// be computed for a given object depends on the set of rules defined for it. Here is a short sequence of commands which lets you find out. What properties //can// be computed for a given object depends on the set of rules defined for it. Here is a short sequence of commands which lets you find out.
 <code> <code>
-polytope> $t=typeof $c;+polytope> $t=$c->type->full_name;
 polytope> print join(", ", sorted_uniq(sort { $a cmp $b } map { keys %{$_->properties} } $t, @{$t->super})); polytope> print join(", ", sorted_uniq(sort { $a cmp $b } map { keys %{$_->properties} } $t, @{$t->super}));
 </code> </code>
  • user_guide/tutorials/properties.txt
  • Last modified: 2019/02/11 16:24
  • by oroehrig