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

 
 

bug #50201: cast not only on numeric type

Submitted by:  Ernst Reissner <ernstreissner>
Submitted on:  Wed 01 Feb 2017 11:18:38 AM UTC  
 
Category: DocumentationSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.2.0Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 02 Feb 2017 05:08:03 AM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Wed 01 Feb 2017 11:18:38 AM UTCernstreissnerCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1