Here is a minor improvement to Fritz's macro:
(It does not insert an extra space.)
Goto_Pos(Block_Begin) //Goto beginning of block
if (At_BOL) { //If at begin-of-line...
// Handle first word in line
if ( Search_Block("|a",Block_Begin,Block_End,NOERR) ) {
Case_Upper_Block(Cur_Pos,Cur_Pos+1,NORESTORE)
}
} else { //Else, not at begin-of-line
Char(-1) //Backup before possible separator
BB(Cur_Pos)
}
//
// Loop to convert all (remaining) words in the block
//
Repeat(ALL){ //search separator+letter
Search_Block("|s|a",Block_Begin,Block_End,ERRBREAK)
Case_Upper_Block(Cur_Pos+1,Cur_Pos+2,NORESTORE) // convert
}
Thank you again Fritz for writing the macro.
Ted.
|
|