Night | Snow

Modulo 11 Prüfziffer in FoxPro

Posted on: December 23rd, 2009

Tags: ,

Hier eine kleine FoxPro Funktion zum Berechnen der «Modulo 11» Prüffziffer.

PROCEDURE modulo_11 (s)
    LOCAL x,z,t, c,r,y
    t=0
    c=7
    FOR x = LEN(s) TO 1 STEP -1
        z = VAL(SUBSTR(s,x,1))
        t = t + c*z
        c=c-1
        IF c<2
            c=7
        ENDIF
    ENDFOR
    r = int(t/11)
    r = t-(r*11)
    IF r<=9
        y="0"+ALLTRIM(STR(r))
    ELSE
        y=ALLTRIM(STR(r))
    ENDIF
    RETURN y
ENDIF

News

  • Apple lays App Store rules bare

    Apple says that it will publish the guidelines it uses to determine which programs it sells in its App Store to appease critical developers.

  • Google unveils 'instant' searches

    Google speeds up its internet search engine by launching a new product called Instant that displays results as soon as users type in queries.

  • Smartphone chip battle heats up

    Intel is to launch its first chip with built-in graphics, while established phone chipmaker ARM releases a fast new chip.

Martin Fischer said:

Client and partner of simra.ch

Wir können Simon Schärer als kompetenter und zuverlässiger Programmierer höchst weiterempfehlen. Er ist nicht nur ein guter Programmierer, sondern auch ein ausgezeichneter Designer.
Danke Developer’s Island

Follow us on Twitter

favorite

I get asked a lot - which SDK should we use for web programming? I recommend Netbeans

my toolbar

Simra GameMP3 playersubscribe to RSSMy delicious bookmarksFacebookTwitterE-mail

No Responses to “Modulo 11 Prüfziffer in FoxPro”

RSS Feed Icon  Subscribe to comments follow-up

Trackbacks/Pingbacks

Leave a reply

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Latest Tweet

loading...