Function

Mohan.itti

New Member
Dear Progress Talker

any one explain briefly in Function and which scenario we can use function method ?

Thanks in advance?
 

RealHeavyDude

Well-Known Member
You've lost me somehow as I don't actually understand what it is that you want to know?

Do you want to know what's the difference between functions, internal procedures and methods ( which are of course only available in OOABL )?

Heavy Regards, RealHeavyDude.
 

Mohan.itti

New Member
Dear RealHeavyDude

Thanks for your reply. actually my question is when we use function and methods? and what is differents?
 

RealHeavyDude

Well-Known Member
That's a simple one.

  • Methods are only supported with classes in OOABL.
  • Functions (user defined functions as they are called exactly) are only supported within procedures in procedural ABL.
Therefore if you develop ABL classes you must use methods whereas if you develop ABL procedures you must use functions or internal procedures.


Heavy Regards, RealHeavyDude.
 

RealHeavyDude

Well-Known Member
  • A persistent procedure remains in memory after the main block of the procedure has been executed - so that you can access internal functions and/or procedures of it from anywhere you have the handle to it.
  • A super procedure is a persistent procedure which is loaded onto the super procedure stack of another procedure _OR_ the session. You don't need to have the handle to it to access its internal procedures or functions. With the concept of super procedures the search order when a RUN or DYNAMIC-FUNCTION statement is executed has been extended:
    1. The current procedure contains an internal procedure or function of the same name.
    2. Some procedure in the super procedure stack of the current procedure contains an internal procedure or function of the same name.
    3. Some procedure in the super procedure stack of the session contains an internal procedure or function of the same name.
    4. (procedures only) an external procedure of the same name can be found in the PROPATH.
    5. You end up in an ERROR.
Infamous implementations of super procedures would be the ADM2 or Dynamics whose smart objects are built on the concept of super procedures.


Heavy Regards, RealHeayDude.
 

Cringer

ProgressTalk.com Moderator
Staff member
In the top right hand side of this forum there is a search function. This is the sort of thing that has been talked about a number of times.

The main advice is: Read the manual.
 

RealHeavyDude

Well-Known Member
The concept of persistent procedures and super procedures is not just code. It's how you design and structure your application. I can only advise you to take a training to understand how the concepts can be applied to your application development.

To elaborate on theses concepts is - IMHO of course - beyond the scope of such a forum. The documentation that comes with the product is pretty comprehensive - it contains an ABL handbook that describes much of what you need to know.


Heavy Regards, RealHeavyDude.
 
Top