657
edits
Line 38: | Line 38: | ||
<!-- {{SyntaxHighlight| --> | <!-- {{SyntaxHighlight| --> | ||
{{Code|pyeval optional argument|<syntaxhighlight lang="octave" style="font-size:13px"> | {{Code|pyeval optional argument|<syntaxhighlight lang="octave" style="font-size:13px"> | ||
x = pyeval ("{1:'one',2:'two'}",@cell); | > x = pyeval ("{1:'one',2:'two'}",@cell); | ||
x{1} | > x{1} | ||
ans = one | ans = one | ||
x{2} | > x{2} | ||
ans = two | ans = two | ||
x = pyeval ("{1:'one',2:'two'}",@char); | |||
x | > x = pyeval ("{1:'one',2:'two'}",@char); | ||
> x | |||
x = | x = | ||
Line 50: | Line 51: | ||
one | one | ||
two | two | ||
whos x | > whos x | ||
Variables in the current scope: | Variables in the current scope: | ||
Line 60: | Line 61: | ||
Total is 6 elements using 6 bytes | Total is 6 elements using 6 bytes | ||
> x = pyeval ("[i for i in xrange(3)]",@double) | |||
x = | |||
0 1 2 | |||
</syntaxhighlight>}} | </syntaxhighlight>}} | ||
The optional argument could be the constructor of an Octave class. | The optional argument could be the constructor of an Octave class. |
edits