Message from discussion
CRC calculation
Received: by 10.68.227.230 with SMTP id sd6mr192744pbc.8.1333139510022;
Fri, 30 Mar 2012 13:31:50 -0700 (PDT)
Path: z9ni19868pbe.0!nntp.google.com!news2.google.com!postnews.google.com!2g2000yqk.googlegroups.com!not-for-mail
From: Gerard_Schildberger <gerar...@rrt.net>
Newsgroups: comp.lang.rexx
Subject: Re: CRC calculation
Date: Fri, 30 Mar 2012 13:24:40 -0700 (PDT)
Organization: http://groups.google.com
Lines: 52
Message-ID: <bc33ae6c-fcc6-4cf8-949d-f2fcc8aa4316@2g2000yqk.googlegroups.com>
References: <dtn2n7tq97d4eroq2h942l1nkask57vids@4ax.com> <f463856a-4c3f-48d7-801f-3c8efb3a333c@t16g2000yqt.googlegroups.com>
<5204f747-307e-44fa-9fc3-bf99516526e2@v1g2000yqm.googlegroups.com> <2516510.2551.1333125159514.JavaMail.geo-discussion-forums@vbgx21>
NNTP-Posting-Host: 69.42.231.32
Mime-Version: 1.0
X-Trace: posting.google.com 1333139509 2756 127.0.0.1 (30 Mar 2012 20:31:49 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 30 Mar 2012 20:31:49 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 2g2000yqk.googlegroups.com; posting-host=69.42.231.32; posting-account=vOcJ0goAAABKRqGJ3LLpDGrRoLRzhLJK
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; MS-RTC EA 2; .NET CLR
3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E),gzip(gfe)
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Mar 30, 11:32=A0am, hakan.hex.eri...@gmail.com wrote:
> Den torsdagen den 29:e mars 2012 kl. 19:27:39 UTC+2 skrev Gerard_Schildbe=
rger:
>
>
>
>
>
> > On Mar 28, 8:51=A0pm, Gerard_Schildberger <gerar...@rrt.net> wrote:
>
> > > if _\=3D=3D''|arg()>1 then call err 'illegal input file specification=
:'
> > > arg(1)
>
> > ... should be one line
>
> > > =A0 =A0 =A0 ?=3Dbitxor(right($,1),substr(!,k,1)); =A0$=3Dbitxor('0'x|=
|left($,
> > > 3),!.?)
>
> > ... should be one line.
>
> > > _=3D
> > > '77073096ee0e612c990951ba076dc419706af48fe963a5359e6495a30edb883279dc=
b8a4e0=AD=ADd5e91e97d2d98809b64c2b7eb17cbde7b82d07'
>
> > ... should be one line.
>
> > (sigh) =A0Brain-dead parser. =A0You'd think that it could handle 74 byt=
es
> > of input without splitting.
> > _____________________________________________ Gerard Schildberger
>
> After changing your codes variable names to something, meaningfull and to=
avoid illegal character($! etc) =A0errors when executing your code in my l=
ocale ( well I don't understand the meaning of using variable names that ar=
e "special" characters instead of a meningful name, which will render the c=
ode more readable). I run OOrexx 4.1. Well when comparing the result CRC cr=
eated by your snippet with 7-zip generated CRC, your programs CRC result =
=A0differ from 7-zip produced CRC.- Hide quoted text -
>
> - Show quoted text -
It would help if you would show the 7-zip produced CRC. I'm assuming
it is CRC-32.
Perhaps it's in decimal?
Try replacing the 2nd SAY instruction with:
say 'hex crc-32 =3D' c2x(crc) left('',20) 'decimal crc-32 =3D' c2d(crc)
_________________________________________________ Gerard Schildberger