This is probably a stupid question, but I can't avoid posting it out of curiosity.
When I rerun a macro without exiting Vedit, can I reset register values in a better way than what is below? My current practice seems to leave certain registers in their previous state, because results can be unpredictable unless I exit VEDIT and re-launch and re-run macro.
Let's say I want to rerun a macro that I'm debugging. My current practice is to hit Ctrl-Break 3x & Ctrl-C 3x to stop a macro after running. Then I'll Close All windows. Without exiting, I'll reload & execute the macro a second time. The second run may run OK or it may not.
The beginning of the macro includes the following to re-initialize registers with user-assigned values.
(Using T-reg:10-17, 95-99; N-reg:#2-#13,#17-#18,#95-#99)
I also pop the registers just in case something is left on the stack.
for (#13=10;#13==17;#13++) {if (Reg_Size(#13)>0) {Reg_Empty(#13)}}
for (#13=95;#13==99;#13++) {if (Reg_Size(#13)>0) {Reg_Empty(#13)}}
do {Reg_Pop(0,0)} while ((Reg_Pop)>0)
do {Num_Pop(0,0)} while ((Num_Pop)>0)
#2=#3=#4=#5=#6=#7=#8=0
#9=#10=#11=#12=#13=#17=#18=0
#95=#96=#97=#98=#99=0
I guess Vedit is a mixture of C and Assembly, as it supports some indirection and functions like '#13++' in the macro language.
Thanks,
Dan Bliss
|
|