Changeset 4530


Ignore:
Timestamp:
07/12/10 11:54:35 (15 years ago)
Author:
seroussi
Message:

FetchData for logical

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/io/FetchData.cpp

    r3961 r4530  
    236236        bool boolean;
    237237
    238         if (!mxIsDouble(dataref)){
    239                 ISSMERROR("input data_type is not a scalar!");
    240         }
    241         else{
     238        if (mxIsClass(dataref,"logical") || mxIsDouble(dataref)){
    242239                /*Recover the double: */
    243240                boolean=(bool)mxGetScalar(dataref);
     241        }
     242        else{
     243                ISSMERROR("input data_type is not a bool!");
    244244        }
    245245
Note: See TracChangeset for help on using the changeset viewer.