Usage of CAN-DO Function

Hi Everybody, :confused:

Can anyone clearly explain what a CAN-DO function does and its usage???
I have got stuck up and can anyone help me out with a simple example which makes the concept more clear???
 

TomBascom

Curmudgeon
CAN-DO() is an ancient function to support Progress style security.

Some of its features were discovered to be similar to string functions like INDEX() that didn't yet exist in very old versions of Progress. Certain very old applications decided to use it in that manner and, as a result, an unfortunately large number of programmers have decided that:

1) it is a string function

2) it is a "best practice" (after all XYZ uses it everywhere...)

CAN-DO() is a horrible excuse for a string function. INDEX() & LOOKUP() and their modern cousins are far better suited to almost all of the jobs that CAN-DO() is used for.

CAN-DO() also has some very serious side effects as a result of its real purpose as a security function. Magic characters in the arguments, that might be embedded in your data, can cause it to do very unexpected things.

Do NOT use CAN-DO() willy-nilly throughout your code. Even if you see other people doing so. It is a coding "worst-practice" that should be stamped out not encouraged.
 
Thank u Mr.TomBasCom, but here in our company we do have codes which contains CAN-DO functions. So i need some clear cut idea on that.

Can u help me out???
 
Top