Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can execute a button click method without showing the fo
Message
De
27/09/2019 16:10:41
 
 
À
27/09/2019 13:54:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01671046
Message ID:
01671231
Vues:
66
>On topic of crazy indentation -- I recall dealing with someone who had an indentation style that involve aligning on certain keywords -- for example, a REPLACE statement would look like:
>
>REPLACE ;
>    FirstName WITH "Bob", ;
>     LastName WITH "Smith", ;
>     BirthDay WITH {01/01/1960}, ;
>       Gender WITH "M", ;
>     Address1 WITH "1234 Main Steet", ;
>     Address2 WITH "", ;
>         City WITH "Los Angeles", ;
>        State WITH "CA", ;
>          Zip WITH "90001", ;
>        Phone WITH "(123)555-1234" ;
>              IN AddrBook
>
I would do this to make it more like a SQL statement:
REPLACE FirstName   WITH "Bob", ;
        LastName    WITH "Smith", ;
        BirthDay    WITH {01/01/1960}, ;
        Gender      WITH "M", ;
        Address1    WITH "1234 Main Steet", ;
        Address2    WITH "", ;
        City        WITH "Los Angeles", ;
        State       WITH "CA", ;
        Zip         WITH "90001", ;
        Phone       WITH "(123)555-1234" ;
    IN AddrBook
I also believe people who write case statements like this:
DO CASE
CASE whatever1
    * Code here
CASE whatever2
    * Code here
ENDCASE
Should be shot. The correct way to write a case statement, as everyone should know, is this:
DO CASE
    CASE whatever1
        * Code here
    CASE whatever2
        * Code here
ENDCASE
It's only natural. :-)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform