⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iskeyword.cpp

📁 matlab的可执行程序
💻 CPP
字号:
//
// MATLAB Compiler: 3.0
// Date: Wed Jul 14 12:15:03 2004
// Arguments: "-B" "macro_default" "-O" "all" "-O" "fold_scalar_mxarrays:on"
// "-O" "fold_non_scalar_mxarrays:on" "-O" "optimize_integer_for_loops:on" "-O"
// "array_indexing:on" "-O" "optimize_conditionals:on" "-B" "sglcpp" "-p" "-W"
// "main" "-L" "Cpp" "-t" "-T" "link:exe" "-h" "libmmfile.mlib" "-W" "mainhg"
// "libmwsglm.mlib" "QQchabu.m" 
//
#include "iskeyword.hpp"
#include "libmatlbm.hpp"

static mxChar _array3_[5] = { 'b', 'r', 'e', 'a', 'k' };
static mxArray * _mxarray2_ = mclInitializeString(5, _array3_);

static mxChar _array5_[4] = { 'c', 'a', 's', 'e' };
static mxArray * _mxarray4_ = mclInitializeString(4, _array5_);

static mxChar _array7_[5] = { 'c', 'a', 't', 'c', 'h' };
static mxArray * _mxarray6_ = mclInitializeString(5, _array7_);

static mxChar _array9_[8] = { 'c', 'o', 'n', 't', 'i', 'n', 'u', 'e' };
static mxArray * _mxarray8_ = mclInitializeString(8, _array9_);

static mxChar _array11_[4] = { 'e', 'l', 's', 'e' };
static mxArray * _mxarray10_ = mclInitializeString(4, _array11_);

static mxChar _array13_[6] = { 'e', 'l', 's', 'e', 'i', 'f' };
static mxArray * _mxarray12_ = mclInitializeString(6, _array13_);

static mxChar _array15_[3] = { 'e', 'n', 'd' };
static mxArray * _mxarray14_ = mclInitializeString(3, _array15_);

static mxChar _array17_[3] = { 'f', 'o', 'r' };
static mxArray * _mxarray16_ = mclInitializeString(3, _array17_);

static mxChar _array19_[8] = { 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n' };
static mxArray * _mxarray18_ = mclInitializeString(8, _array19_);

static mxChar _array21_[6] = { 'g', 'l', 'o', 'b', 'a', 'l' };
static mxArray * _mxarray20_ = mclInitializeString(6, _array21_);

static mxChar _array23_[2] = { 'i', 'f' };
static mxArray * _mxarray22_ = mclInitializeString(2, _array23_);

static mxChar _array25_[9] = { 'o', 't', 'h', 'e', 'r', 'w', 'i', 's', 'e' };
static mxArray * _mxarray24_ = mclInitializeString(9, _array25_);

static mxChar _array27_[10] = { 'p', 'e', 'r', 's', 'i',
                                's', 't', 'e', 'n', 't' };
static mxArray * _mxarray26_ = mclInitializeString(10, _array27_);

static mxChar _array29_[6] = { 'r', 'e', 't', 'u', 'r', 'n' };
static mxArray * _mxarray28_ = mclInitializeString(6, _array29_);

static mxChar _array31_[6] = { 's', 'w', 'i', 't', 'c', 'h' };
static mxArray * _mxarray30_ = mclInitializeString(6, _array31_);

static mxChar _array33_[3] = { 't', 'r', 'y' };
static mxArray * _mxarray32_ = mclInitializeString(3, _array33_);

static mxChar _array35_[5] = { 'w', 'h', 'i', 'l', 'e' };
static mxArray * _mxarray34_ = mclInitializeString(5, _array35_);

static mxArray * _array1_[17] = { _mxarray2_, _mxarray4_, _mxarray6_,
                                  _mxarray8_, _mxarray10_, _mxarray12_,
                                  _mxarray14_, _mxarray16_, _mxarray18_,
                                  _mxarray20_, _mxarray22_, _mxarray24_,
                                  _mxarray26_, _mxarray28_, _mxarray30_,
                                  _mxarray32_, _mxarray34_ };
static mwArray _mxarray0_ = mclInitializeCellVector(17, 1, _array1_);

void InitializeModule_iskeyword() {
}

void TerminateModule_iskeyword() {
    mxDestroyArray(_mxarray34_);
    mxDestroyArray(_mxarray32_);
    mxDestroyArray(_mxarray30_);
    mxDestroyArray(_mxarray28_);
    mxDestroyArray(_mxarray26_);
    mxDestroyArray(_mxarray24_);
    mxDestroyArray(_mxarray22_);
    mxDestroyArray(_mxarray20_);
    mxDestroyArray(_mxarray18_);
    mxDestroyArray(_mxarray16_);
    mxDestroyArray(_mxarray14_);
    mxDestroyArray(_mxarray12_);
    mxDestroyArray(_mxarray10_);
    mxDestroyArray(_mxarray8_);
    mxDestroyArray(_mxarray6_);
    mxDestroyArray(_mxarray4_);
    mxDestroyArray(_mxarray2_);
}

static mwArray Miskeyword(int nargout_, mwArray s);

_mexLocalFunctionTable _local_function_table_iskeyword
  = { 0, (mexFunctionTableEntry *)NULL };

//
// The function "iskeyword" contains the normal interface for the "iskeyword"
// M-function from file "e:\matlab6.5\toolbox\matlab\lang\iskeyword.m" (lines
// 1-41). This function processes any input arguments and passes them to the
// implementation version of the function, appearing above.
//
mwArray iskeyword(mwArray s) {
    int nargout = 1;
    mwArray L = mwArray::UNDEFINED;
    L = Miskeyword(nargout, s);
    return L;
}

//
// The function "mlxIskeyword" contains the feval interface for the "iskeyword"
// M-function from file "e:\matlab6.5\toolbox\matlab\lang\iskeyword.m" (lines
// 1-41). The feval function calls the implementation version of iskeyword
// through this function. This function processes any input arguments and
// passes them to the implementation version of the function, appearing above.
//
void mlxIskeyword(int nlhs, mxArray * plhs[], int nrhs, mxArray * prhs[]) {
    MW_BEGIN_MLX();
    {
        mwArray mprhs[1];
        mwArray mplhs[1];
        int i;
        mclCppUndefineArrays(1, mplhs);
        if (nlhs > 1) {
            error(
              mwVarargin(
                mwArray(
                  "Run-time Error: File: iskeyword Line: 1 Column: "
                  "1 The function \"iskeyword\" was called with mor"
                  "e than the declared number of outputs (1).")));
        }
        if (nrhs > 1) {
            error(
              mwVarargin(
                mwArray(
                  "Run-time Error: File: iskeyword Line: 1 Column:"
                  " 1 The function \"iskeyword\" was called with m"
                  "ore than the declared number of inputs (1).")));
        }
        for (i = 0; i < 1 && i < nrhs; ++i) {
            mprhs[i] = mwArray(prhs[i], 0);
        }
        for (; i < 1; ++i) {
            mprhs[i].MakeDIN();
        }
        mplhs[0] = Miskeyword(nlhs, mprhs[0]);
        plhs[0] = mplhs[0].FreezeData();
    }
    MW_END_MLX();
}

//
// The function "Miskeyword" is the implementation version of the "iskeyword"
// M-function from file "e:\matlab6.5\toolbox\matlab\lang\iskeyword.m" (lines
// 1-41). It contains the actual compiled code for that M-function. It is a
// static function and must only be called from one of the interface functions,
// appearing below.
//
//
// function L = iskeyword(s)
//
static mwArray Miskeyword(int nargout_, mwArray s) {
    mwLocalFunctionTable save_local_function_table_
      = &_local_function_table_iskeyword;
    int nargin_ = nargin(1, mwVarargin(s));
    mwArray L = mwArray::UNDEFINED;
    //
    // %ISKEYWORD Check if input is a keyword.
    // %   ISKEYWORD(S) returns one if S is a MATLAB keyword,
    // %   and 0 otherwise.  MATLAB keywords cannot be used 
    // %   as variable names.
    // %
    // %   ISKEYWORD used without any inputs returns a cell array containing
    // %   the MATLAB keywords.
    // %
    // %   See also ISVARNAME.
    // 
    // %   $Revision: 1.3 $  $Date: 2002/04/08 23:29:22 $
    // %   Copyright 1984-2002 The MathWorks, Inc.
    // 
    // L = {...
    //
    L = _mxarray0_;
    //
    // 'break',
    // 'case',
    // 'catch',
    // 'continue',
    // 'else',
    // 'elseif',
    // 'end',
    // 'for',
    // 'function',
    // 'global',
    // 'if',
    // 'otherwise',
    // 'persistent',
    // 'return',
    // 'switch',
    // 'try',
    // 'while',
    // };
    // 
    // if nargin==0
    //
    if (nargin_ == 0) {
    //
    // %  Return the list only
    // return
    // else
    //
    } else {
        //
        // L = any(strcmp(s,L));
        //
        L = any(strcmp(mwVa(s, "s"), mwVv(L, "L")));
    //
    // end
    //
    }
    mwValidateOutput(L, 1, nargout_, "L", "iskeyword");
    return L;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -