bugGNU Octave - Bugs: bug #50201, cast not only on numeric type

 
 

bug #50201: cast not only on numeric type

Submitter:  Ernst Reissner <ernstreissner>
Submitted:  Wed 01 Feb 2017 11:18:38 AM UTC
   
 
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.2.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 02 Feb 2017 05:08:03 AM UTC, comment #1: 

I expanded the documentation on cast in this cset (http://hg.savannah.gnu.org/hgweb/octave/rev/01bf5c733de7).

Rik <rik5>
Group administrator
Wed 01 Feb 2017 11:18:38 AM UTC, original submission:  

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.

Ernst Reissner <ernstreissner>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by ernstreissner (Submitted the item)
  • -email is unavailable- added by ernstreissner
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-02 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2017-02-01 ernstreissner Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code