[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Changeset] isa function with float and numeric arguments
From: |
David Bateman |
Subject: |
Re: [Changeset] isa function with float and numeric arguments |
Date: |
Tue, 13 May 2008 12:26:53 +0200 |
User-agent: |
Thunderbird 2.0.0.12 (X11/20080306) |
John W. Eaton wrote:
> On 12-May-2008, Bill Denney wrote:
>
> | David Bateman wrote:
> | > David Bateman wrote:
> | >
> | >> The isa function should allow the "float" and "numeric" arguments. The
> | >> attached patch adds this.
> | >>
> | >> D.
> | > Please use this version instead.
> | >
> | > D.
> | >
> | Wouldn't this be easier to read (and marginally faster) if written as:
> |
> | if (strcmp (cname, "float"))
> | retval = any (strcmp (class (x), {"double" "single"}));
> | elseif (strcmp (cname, "fnumeric"))
> | classes = {"double" "single" "uint8" "uint16" "uint32" "uint64" "int8"
> "int16" "int32" "int64"};
> | retval = any (strcmp (class (x), classes));
> | else
> | retval = strcmp (class (x), cname);
> | endif
>
> I made this change, and used persistent variables for the cell arrays
> to avoid the need for reinitializing them on each call.
>
The version in the repository seems to be mine.. You don't seem to have
committed the changes that make the classes variable persisent..
D.
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary