I FULLY undestand how it works in xedit and verified that the THE doc indicates it is comparable.
The 'repeat' command works fine as a command in THE when entered in the command area. But it seems to be ignored when used in a macro. Or, it maybe it is just not be advancing the record pointer correctly when used within a macro. Either way, it fails while the same code on VM works correctly.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think you misunderstand what Repeat does. Read the pdf file a little more closely.
I FULLY undestand how it works in xedit and verified that the THE doc indicates it is comparable.
The 'repeat' command works fine as a command in THE when entered in the command area. But it seems to be ignored when used in a macro. Or, it maybe it is just not be advancing the record pointer correctly when used within a macro. Either way, it fails while the same code on VM works correctly.
example that is not working:
54 *-* do
55 *-* 'locate :'pline
>L> "locate :"
>V> "21"
>O> "locate :21"
56 *-* 'clocate :62'
>L> "clocate :62"
57 *-* 'creplace '||who when
>L> "creplace "
>V> "TT"
>O> "creplace TT"
>V> "072110"
>O> "creplace TT 072110"
58 *-* if op > 1
>V> "3"
>L> "1"
>O> "1"
59 *-* do
60 *-* 'repeat' op-1
>L> "repeat"
>V> "3"
>L> "1"
>O> "2"
>O> "repeat 2"
yet, the following test macro works:
op = 9
'DOWN 20'
'clocate :20'
'creplace ddddd'
if op > 2
then do
'repeat' op-1
'top'
end
I am stumped. :-(