Difference between function return value and literal

Peter von Niederhaeusern pvonnied at gmail.com
Fri Jul 16 14:18:13 CEST 2010


Hi all,

This might be a silly question, but I don't get it:

// 1. version
rows=myCell.dims(1);
disp(rows);  // -> 2
disp( [1:1:rows] ); // -> 1 2

// 2. version
 _rows=2;
 disp(_rows); // -> 2.
 disp( [1:1:_rows] ); // 1. 2.

What's the difference between the plain values (e.g. 2) of the return value
and the indexed values with dots (e.g. 2.)?

I need to get the second version but dynamically
(as in the first version) assigned (to read out some values from a cell)...

Thx for a hint
Peter



More information about the users mailing list