hi Josip,
thanks for Your answer
yes, that's exactly what I want, but since the code is already written in VFP, I was hoping that there was code that would work in Lianja as well, without having to introduce additional auxiliary variables