/* $VER: Ecomment.ged 0.5 (02.04.1998) By Map */ /* Insert E comment markers( and a string ) at begin - end of a ** selected block.After execution mark block removed */ OPTIONS RESULTS /* enable return codes */ if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */ address 'GOLDED.1' 'LOCK CURRENT RELEASE=4' /* lock GUI, gain access */ if (RC ~= 0) then exit OPTIONS FAILAT 6 /* ignore warnings */ SIGNAL ON SYNTAX /* ensure clean exit */ /* ------------------------ INSERT YOUR CODE HERE: ------------------- */ attention = " You MUST select something.." 'QUERY MARKED' /* selected block ? */ if (result = 'TRUE') then /* if YES go to comment... */ do begin = "/** -- EComment --" end = ' -- EComment -- **/' 'GOTO BFIRST' /* beginnig of block */ 'INSERT LINE' 'FIRST' /* beginning of line */ 'TEXT T="'begin'"' /* first E comment marker */ 'GOTO BLAST' /* end block */ 'SMARTCR' 'INSERT LINE' 'FIRST' 'TEXT T="'end'"' /* second E comment marker */ 'BLOCK HIDE' /* deselected block */ end else 'REQUEST PROBLEM="'attention'"' /* ---------------------------- END OF YOUR CODE ---------------------*/ 'UNLOCK' /* VERY important: unlock GUI */ exit SYNTAX: SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-(" 'UNLOCK' exit