Alain, it clearly was a quick example without warranty ;-) You'd need an extra 'locate 1' after the 'fanintwo' to stop the feedback. I forgot that verify selects the record when the input range is not present.
Rob On Mon, 21 Apr 2025 at 15:43, Alain Benvéniste <[email protected]> wrote: > Hi Rob, > > I took your example to understand in what case I could use fanintwo. > > /**/ > > QUEUE "COPYFILE" > > "PIPE (ENDchar ?)", > "STACK", > "!01: FANINTWO AUTOSTOP", > "!02: FANOUT", > "! VERIFY -1 /abcdefghijklmnopqrstuvwxyz/", > "! SUBSTR 1;-2", > "! ELASTIC", > "!01:", > "?", > "02:", > "! CONSole" > > IF "COPYFILE" is in uppercase, I receive COPYFILE. > IF I test with "COPYfile", I receive : > COPYfile > COPYfil > COPYfi > COPYf > COPY > > I understand, in this example, that fanintwo loops over the same record, > testing 1 character by 1 character until the end. > > if I test with "copyfile" is in lowercase, I receive : > copyfile > copyfil > copyfi > copyf > copy > cop > co > c > . > . > > The PIPE never ends. > > Regards > Alain >
