void DtFieldSubstring( void ) { //========================== // Data initialize a substring character item within a structure. sym_id fd; intstar4 base; intstar4 first; intstar4 last; char name[MAX_SYMLEN+1]; base = DXPop(); first = DXPop(); fd = GetPtr(); last = GetInt(); if( last != 0 ) { last += first - 1; } else { last = DXPop(); } GetU16(); // skip typing information if( DoSubstring( first, last, fd->u.fd.xt.size ) ) { DXPush( base + first - 1 ); DtItemSize = last - first + 1; } else { STFieldName( fd, name ); Error( EV_SSTR_INVALID, name, StmtKeywords[ PR_DATA ] ); } }
void FieldErr( int errcode, sym_id sym ) { //=========================================== char field_name[MAX_SYMLEN+1]; STFieldName( sym, field_name ); Error( errcode, field_name ); }
void DtFieldSubscript( void ) { //========================== // Data initialize an array element within a structure. sym_id fd; intstar4 offset; intstar4 base; char name[MAX_SYMLEN+1]; base = DXPop(); fd = GetPtr(); if( Subscript( fd->u.fd.dim_ext, &offset ) ) { if( fd->u.fd.typ == FT_STRUCTURE ) { offset *= fd->u.fd.xt.record->size; } else { offset *= fd->u.fd.xt.size; } DXPush( base + offset ); } else { STFieldName( fd, name ); Error( EV_SSCR_INVALID, name, StmtKeywords[ PR_DATA ] ); } }