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

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...