Changeset 75 in dev for BasicCompiler_Common/Const.cpp
- Timestamp:
- Mar 20, 2007, 4:36:16 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/Const.cpp
r7 r75 153 153 } 154 154 void CDBConst::AddConst(char *Name, char *Expression){ 155 LONG_PTR lpIndex;156 155 _int64 i64data; 157 int Type = StaticCalculation(false, Expression, 0, &i64data, &lpIndex); 158 159 if(Type){ 160 //リテラル値の場合 161 //登録を行う 162 163 CConst *newconst = new CConst(Name, Type, i64data); 164 165 AddConst(Name, newconst); 166 } 167 else{ 156 Type resultType; 157 if( !StaticCalculation(false, Expression, 0, &i64data, resultType) ){ 168 158 //変数の場合 169 159 //何もしない(実行領域コンパイル時にdim宣言として扱う) 170 } 160 return; 161 } 162 163 //リテラル値の場合 164 //登録を行う 165 166 CConst *newconst = new CConst(Name, resultType.GetBasicType(), i64data); 167 168 AddConst(Name, newconst); 171 169 } 172 170 void CDBConst::AddConst(char *Name, int value){
Note:
See TracChangeset
for help on using the changeset viewer.