23. Januar 2007 14:47
24. Januar 2007 15:17
24. Januar 2007 15:25
25. Januar 2007 09:53
6. Dezember 2007 13:57
Parameter: pText / Text / 250
Return Value: RetVal / Text / 250
Variables:
Checksum / Integer
i / Integer
currentchar / Char
StartChar / Char
StopChar / Char
ChecksumChar / Char
StartChar:='š';
StopChar:='œ';
Checksum:=104;
FOR i:=1 TO STRLEN(pText) DO BEGIN
currentchar:=pText[i];
Checksum := Checksum +(i*(currentchar-32));
END;
ChecksumChar:= Checksum MOD 103;
ChecksumChar:= ChecksumChar+32;
// convert SPACE to ALT+0128
pText:=CONVERTSTR(pText,' ','€');
RetVal:=STRSUBSTNO('%1%2%3%4',
StartChar,pText,ChecksumChar,StopChar);
EXIT(RetVal);