Try Catch

Discussions about CSEntry
Post Reply
leulae
Posts: 46
Joined: December 16th, 2016, 5:51 am

Try Catch

Post by leulae »

I am developing an entry application, there are buttons to skip, I use below function to skip works fine.

function skipOP(alpha varToSKP)
skip to varToSKP;
end;

My proble: when I am in same variable and try to skip It gives the warning / Error, I know it is reasonable

Unable to ‘skip to VARXXXX’ – target item is the current item {}

But I want to get rid on this and not to show to user like C#, java languages

function skipOP(alpha varToSKP)
try {
skip to varToSKP;
}
Catch {
}
end;

Can I go to implementation like that?

Thanks in advance

Leulae
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Try Catch

Post by josh »

We don't have anything like that in CSPro. You could try the following:
if getsymbol() <> varToSKP then
   
skip to varToSKP;
endif
You might also look at using "move to" instead skip. That does skip for fields ahead of the current field and does a reenter for the current fields or previous fields.
Post Reply