Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can VFP be used to trigger the End of the World?
Message
De
11/12/2012 07:30:12
 
 
À
10/12/2012 12:21:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01559201
Message ID:
01559281
Vues:
103
Hmm. Couldn't resist trying a C# version.

VFP took 85 seconds to reach 'AABAABZZY'
C# took less than 1 second.
Didn't test over a longer loop because I got scared :-}

>Since we're nearing the Mayan end of calendar ( 2012.12.21 ) and by interpretation of some folks that it'll bring about the End of the World... A "brute-force" version of program to determine the nine billion names of God to see if I can indeed trigger the End of the World (though it probably won't work as I'm using the wrong alphabet).
>
>
>FOR A1=1 TO 26
>    FOR A2=1 TO 26
>        FOR A3=1 TO 26
>            IF A1==A2 AND A1==A3 THEN
>                LOOP
>            ENDIF
>            FOR A4=1 TO 26
>                IF A2==A3 AND A2==A4 THEN
>                    LOOP
>                ENDIF
>                FOR A5=1 TO 26
>                    IF A3==A4 AND A3==A5 THEN
>                        LOOP
>                    ENDIF
>                    FOR A6=1 TO 26
>                        IF A4==A5 AND A4==A6 THEN
>                            LOOP
>                        ENDIF
>                        FOR A7=1 TO 26
>                            IF A5==A6 AND A5==A7 THEN
>                                LOOP
>                            ENDIF
>                            FOR A8=1 TO 26
>                                IF A6==A7 AND A6==A8 THEN
>                                    LOOP
>                                ENDIF
>                                FOR A9=1 TO 26
>                                    IF m.A7==m.A8 AND m.A7==m.A9 THEN
>                                        LOOP
>                                    ENDIF
>                                    ?? CHR(ASC("A")+A1-1)
>                                    ?? CHR(ASC("A")+A2-1)
>                                    ?? CHR(ASC("A")+A3-1)
>                                    ?? CHR(ASC("A")+A4-1)
>                                    ?? CHR(ASC("A")+A5-1)
>                                    ?? CHR(ASC("A")+A6-1)
>                                    ?? CHR(ASC("A")+A7-1)
>                                    ?? CHR(ASC("A")+A8-1)
>                                    ?? CHR(ASC("A")+A9-1)
>                                    ?
>                                ENDFOR
>                            ENDFOR
>                        ENDFOR
>                    ENDFOR
>                ENDFOR
>            ENDFOR
>        ENDFOR
>    ENDFOR
>ENDFOR
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform