Changeset 206 in dev for trunk/abdev/BasicCompiler_Common/Object.cpp
- Timestamp:
- Jul 12, 2007, 2:58:26 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/Object.cpp
r198 r206 1 #include "stdafx.h" 2 1 3 #include <Compiler.h> 2 4 … … 11 13 extern HANDLE hHeap; 12 14 13 void CallConstructor( const char *ObjectName,const int *SubScripts,const Type &type,const char *Parameter){15 void CallConstructor( const char *ObjectName,const Subscripts &subscripts,const Type &type,const char *Parameter){ 14 16 if( !type.IsObject() ){ 15 17 return; … … 21 23 ///////////////////////////////////// 22 24 23 UserProc *pUserProc; 24 pUserProc=GetMethodHash(ObjectName,type.GetClass().GetName().c_str(),Parameter); 25 const UserProc *pUserProc = GetMethodHash(ObjectName,type.GetClass().GetName().c_str(),Parameter); 25 26 if(!pUserProc){ 26 27 if(Parameter[0]) SetError(113,type.GetClass().GetName().c_str(),cp); … … 31 32 char temporary[VN_SIZE]; 32 33 33 if( SubScripts[0]!=-1){34 if( subscripts.size() > 0 ){ 34 35 int ss[MAX_ARRAYDIM]; 35 36 memset(ss,0,MAX_ARRAYDIM*sizeof(int)); 36 37 while(1){ 37 38 int i3; 38 for(i3=0;;i3++){ 39 if(SubScripts[i3]==-1) break; 40 41 if(ss[i3]>SubScripts[i3]){ 39 for(i3=0; i3<(int)subscripts.size(); i3++){ 40 if(ss[i3]>subscripts[i3]){ 42 41 ss[i3]=0; 43 42 ss[i3+1]++; … … 45 44 else break; 46 45 } 47 if(SubScripts[i3]==-1) break; 46 if( i3 == subscripts.size() ) 47 { 48 break; 49 } 48 50 sprintf(temporary,"%s[%d",ObjectName,ss[0]); 49 for(i3=1;;i3++){ 50 if(SubScripts[i3]==-1) break; 51 51 for(i3=1; i3<(int)subscripts.size(); i3++){ 52 52 sprintf(temporary+lstrlen(temporary),",%d",ss[i3]); 53 53 }
Note:
See TracChangeset
for help on using the changeset viewer.