<html>
    <head>
      <base href="http://bugzilla.scilab.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
         <tr>
                <th>Reporter</th>
            <td>Alain.Lamy@cnes.fr</td>
         </tr>
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Structures containing lists with 1 element : wrong type with syntax: structure("field")"
   href="http://bugzilla.scilab.org/show_bug.cgi?id=15497">15497</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Structures containing lists with 1 element : wrong type with syntax: structure("field")
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Scilab software
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.0.1
          </td>
        </tr>


        <tr>
          <th>OS</th>
          <td>All OS
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Critical
          </td>
        </tr>


        <tr>
          <th>Component</th>
          <td>Scilab
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>bugzilla.admin@scilab.org
          </td>
        </tr>
</table>
      <p>
        <div>
        <pre>BUG DESCRIPTION:
----------------
Major problem with Scilab 6.0.0 or Scilab 6.0.1 : 
If s is a structure that constains fields of type "list": 

s("a") and s.a (or getfield("a", s)) are different if the number of elements in the list is 1

See example. 


ERROR LOG:
----------
None. 
Wrong behaviour. 


HOW TO REPRODUCE THE BUG:
-------------------------

s = struct("a", list(1,2), "b", list(3));

--> s
 s  = 
  a: list
  b: list


--> typeof(s.a)
 ans  =
 list
// OK 


--> typeof(s.b)
 ans  =
 list
// OK 


--> typeof(getfield("a", s))
 ans  =
 list
// OK 


--> typeof(getfield("b", s))
 ans  =
 list
// OK 


--> typeof(s("a"))
 ans  =
 list
// OK 


--> typeof(s("b"))
 ans  =
 constant
// *** NOT OK *** 



OTHER INFORMATION:
------------------
OK with Scilab 5</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>