Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's the secret meaning of this piece of code?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00042899
Message ID:
00042950
Vues:
36
>>I elected to pass on your initial query because you seemed to have omitted some potentially important information, the most basic of which was Vinod's simple question!
>
>Ok. It's somehow obvious that there are other lines of code that use the Cmd_Param variable. Does it help in any way if I say: "the Cmd_Param is used further in the program"? In my opinion it doesn't matter too much. The piece of code I gave is right at the begining of the program and I would like to know if anybody can find a reason for which a programmer would write those lines of code. As I said, I don't see any difference with or without them, so... But maybe the programmer (the author) came from Clipper (I never used Clipper) and maybe in Clipper that code makes sense. Or something like that...
>
>>Your original question certainly *IMPLIED* that there was no other reference to the field(s) in question, cause if there was it would have made sense for you to mention it. You *IMPLIED* that this code stood alone and appeared useless.
>
>I didn't implied anything. I just gave a piece of code from the begining of the main program.
>
>>Now we learn it does *NOT* stand alone. Perhaps, with the *FULL* background, some sensible answer can be derived.
>
>Ok. There's no full background here. That variable/parameter is used further, as I said.
>
>Now, when you have to say what a piece of code is doing, you must say what is the difference in the status of the program after the code is executed compared with the status before. That's all. Now, if you can give an exemple of further use of that variable so that will justify your demand for *FULL* background... it's exactly what I'm looking for. I mean: do you see a situation when that code makes sense? (Maybe the situation you find doesn't exist anymore in the program but the code is still there because somebody forgot to delete it, etc.).
>
>The program is full of strange pieces of code. It's obvious to me that the author was not very good in FoxPro. But for almost everything I could find an explanation. Obviously, I rewrote almost all "strange" solutions, but the one I gave still bothers me (in the same time, the author was not just stupid from what I see).
>
>To be more clear: I already deleted that part, I verified the program, etc. I am just curious if somebody can find I good reason...
>
>Vlad

Vlad, if the programmer was a Clipper programmer, he may assume that any parameter passed defaults to LOCAL not PRIVATE, as that is how Clipper treats variables. Therefore he was switching a LOCAL to a PRIVATE for some reason as I suggested in my previous message.

Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform