Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can execute a button click method without showing the fo
Message
From
27/09/2019 16:10:41
 
 
To
27/09/2019 13:54:55
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01671046
Message ID:
01671231
Views:
65
>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. :-)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform