Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Procedure file
Message
De
14/11/2000 16:12:32
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00441834
Message ID:
00441843
Vues:
9
>Is there some way to get the procedure names out of a procedure file ? or just check for existance of a procedure / function in a procedure file. ?
>
>like you can with a file itself.
>if file("myprg")
>do myprg
>else
>do something else
>endif
>
>
>but say
>ifexist= procedure("myprocedure","procdecurefile")
>
>or anything close ?
>
>Thanks all
>
>Bob Lee

Nothing that simple.
For programs with less than 65,000 lines this works, YMMV
ALines(laCode,FileToStr("myprog.prg"))
For ji =1  To ALen(laCode,1)
  lcLine = Alltrim(Strtran(laCode[ji],Chr(9)," "))
  lcFirst = Upper(Left(lcLine,At(" ",lcLine)-1))
  If lcFirst $ "PROCEDURE"  Or lcFirst $ "FUNCTION"
    ? lcLine
  EndIf
EndFor
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform