octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #50201] cast not only on numeric type


From: Ernst Reissner
Subject: [Octave-bug-tracker] [bug #50201] cast not only on numeric type
Date: Wed, 1 Feb 2017 11:18:39 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0

URL:
  <http://savannah.gnu.org/bugs/?50201>

                 Summary: cast not only on numeric type
                 Project: GNU Octave
            Submitted by: ernstreissner
            Submitted on: Wed 01 Feb 2017 11:18:38 AM GMT
                Category: Documentation
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.0
        Operating System: Any

    _______________________________________________________

Details:

manual p40: 
cast (val, "type")
Convert val to data type type.
val must be one of the numeric classes:
"double"
"single"
"logical"
"char"
"int8"
"int16"
"int32"
"int64"
"uint8"
"uint16"
"uint32"
"uint64"


The truth is that type must be one of those. 

cast('a','double')

is allowed. 

What cast(x,'double') does is simply double(x). 
Analogously for the other types. 
So type determines the allowed values for x. 

This should be documented. 




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50201>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]