Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search for text in .prg to see if specific procedure exi
Message
From
13/12/2001 10:46:00
 
 
To
13/12/2001 10:34:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00593857
Message ID:
00593864
Views:
29
This message has been marked as the solution to the initial question of the thread.
>Is there an easy way to search for text in a .prg? I need to know if a specific procedure exists in a .prg before I try to run it.
>
>For instance, I need to know if 'procedure ix_insured' is in tblstruc.prg. The tblstruc.prg is included in the project.
>
>TIA,
>Tracy
>:0)

In addition to what other's have said:

If you need to do that at runtime and the prg is not incorporated in a project, you could do a FileToStr(), ALINES() and parse each row in the array for PROCEDURE myProcedureName prior to a comment.

If you have the opportunity to create classes rather than PRGs, it's even simpler to test using the PEMStatus() function.

Jay
Previous
Reply
Map
View

Click here to load this message in the networking platform