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

📄 gbc_type.h

📁 Gambas is a graphical development environment based on a Basic interpreter, like Visual Basic. It us
💻 H
字号:
/***************************************************************************  type.h  Datatypes definitions and management  (c) 2000-2004 Beno顃 Minisini <gambas@users.sourceforge.net>  This program is free software; you can redistribute it and/or modify  it under the terms of the GNU General Public License as published by  the Free Software Foundation; either version 1, or (at your option)  any later version.  This program is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License for more details.  You should have received a copy of the GNU General Public License  along with this program; if not, write to the Free Software  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.***************************************************************************/#ifndef __GBC_TYPE_H#define __GBC_TYPE_H#include "gb_type_common.h"/***************************************************  Format d'un Type  F K T T X X X X  F : Flags (TF_*)  K : Kind (TK_*)  T : Type (T_*)  X : index, pour T_OBJECT, T_ARRAY, T_STRUCT***************************************************//*typedef  ulong TYPE;*/typedef  unsigned char TYPE_ID;typedef  union {    struct {      unsigned char flag;      TYPE_ID id;      short value;      } t;    long l;    }  TYPE;typedef  struct {    long value;    TYPE type;    }  VALUE;/*#define TYPE_is_const(type)      (((type) >> 24) & TF_CONST)*/#define TYPE_is_static(type)     ((type).t.flag & TF_STATIC)#define TYPE_is_public(type)     ((type).t.flag & TF_PUBLIC)#define TYPE_is_optional(type)   ((type).t.flag & TF_OPTIONAL)/*#define TYPE_is_output(type)     (((type) >> 24) & TF_OUTPUT)*/#define TYPE_is_array(type)      (TYPE_get_id(type) == T_ARRAY)#define TYPE_is_object(type)     ((TYPE_get_id(type) == T_OBJECT) && (TYPE_get_value(type) >= 0))#define TYPE_get_value(type)     ((type).t.value)#define TYPE_get_kind(type)      ((type).t.flag & 0x7)#define TYPE_get_id(type)        ((type).t.id)#define TYPE_is_null(type)       ((type).l == 0)#define TYPE_set_value(type, _value)     ((type)->t.value = (_value))#define TYPE_set_id(type, _id)           ((type)->t.id = (_id))#define TYPE_set_kind(type, _kind)       ((type)->t.flag |= (_kind))#define TYPE_set_flag(type, _flag)       ((type)->t.flag |= (_flag))#define TYPE_clear(type)                 ((type)->l = 0)#define TYPE_long(type)         ((type).l)#define TYPE_can_be_long(type)  (TYPE_get_id(type) <= T_LONG)#define TYPE_compare(_t1, _t2) ((_t1)->t.id == (_t2)->t.id && (_t1)->t.value == (_t2)->t.value)/*PUBLIC long TYPE_get_class(TYPE type);*/PUBLIC TYPE TYPE_make(TYPE_ID id, short value, int flag);PUBLIC char *TYPE_get_desc(TYPE type);PUBLIC long TYPE_sizeof(TYPE type);#endif

⌨️ 快捷键说明

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