PDA

View Full Version : Customizing RPG enter key question



Guest.Visitor
06-23-2000, 04:35 AM
After a little bit of experimenting, I have been able to customize the macro RPGENT. Originally, after you hit enter, it would create another line with the same spec as the last line and put the cursor in the location where it would most likely be needed next. (Example: a c-spec would create another c-spec and place the cursor at the opcode.) I modified the rpgent macro to behave as follows if an if, dow, dou or select operation is entered: * Insert a c-spec line. * Insert another line containing the matching endxx opcode. * Back up one line (using PREV ELEMENT) to the empty c-spec line and position the cursor to the opcode. My question is: I'm trying to write some "opcode speed-dials" for things that tend to get typed over and over again in program after program. Examples: If I put the number 1 in the opcode and hit enter, it would replace the line with "Eval x = (a + b) * ((c+d) - e)" How do you go to a previous element and replace what was typed in? I tried using overlay but that didn't work. As a related question, are there samples of things that people have done to customize key behaviour. This was my first time working with REXX. Thanks.