2020年12月22日星期二

How to launch an external procedure in OpenEdge Progress-4GL

While learning about OpenEdge Progress-4GL, I stumbled upon running external procedures, and I just read following line of code, describing how to do this:

RUN p-exprc2.p.  

For a person with programming experience in C/C++, Java and Delphi, this makes absolutely no sense: in those languages there is a bunch of procedures (functions), present in external files, which need to be imported, something like:

filename "file_with_external_functions.<extension>"  ===================================================  int f1 (...){    return ...;  }    int f2 (...){    return ...;  }    filename "general_file_using_the_mentioned_functions.<extension>"  =================================================================  #import file_with_external_functions.<extension>;  ...  int calculate_f1_result = f1(...);  int calculate_f2_result = f2(...);  

So, in other words: external procedures (functions) mean that you make a list of procedures (functions), you put all of them and in case needed, you import that file and launch the procedure (function) when you need it.

In Progress 4GL, it seems you are launching the entire file!
Although this makes no sense at all in C/C++, Java, Delphi, I believe this means that Progress procedure files (extension "*.p") only should contain one procedure, and the name of the file is then the name of that procedure.

Is that correct and in that case, what's the sense of the PERSISTENT keyword?

Thanks in advance
Dominique

https://stackoverflow.com/questions/65409516/how-to-launch-an-external-procedure-in-openedge-progress-4gl December 22, 2020 at 09:24PM

没有评论:

发表评论