[Gambas-user] Error #6

Benoit Minisini gambas at ...1...
Thu Aug 3 13:57:39 CEST 2006


On Tuesday 01 August 2006 23:59, Leonardo Miliani wrote:
> Benoit Minisini ha scritto:
> > On Tuesday 01 August 2006 10:09, Leonardo Miliani wrote:
> >> Benoit Minisini ha scritto:
> >>> On Tuesday 01 August 2006 01:02, Leonardo Miliani wrote:
> >>>> I was writing a crypto program and during the testing section I got
> >>>> the Error #6 and this output from the console:
> >>>
> >>> Can you reproduce the bug?
> >>
> >> Yes, every time that I run my application, it generate the same error.
> >> If you want, I can send you the source code so you can examine it and
> >> try to understand what happens.
> >
> > Of course, send me the application!
>
> Here is the archive. I was working on clsAES, a translation of an
> application in VB that I found on net.
> Launch the program, choose a file to crypt, insert some chars as
> keyword, select the AES algorithm and click on PROCEDI.
> The bug was generated from some code issues that I fixed up: so this
> version is only for testing.

I got it. The bug only appears when a error is raised when using round 
brackets instead of square brackets for accessing an array, as in your code. 

Just replace all round brackets by square brackets when you access an array, 
and things should go better.

Note that you have bit manipulation functions in Gambas, so you can get rid of 
LShift, RShift, RotateLeft, RotateByteLeft... functions.

Regards,

-- 
Benoit Minisini





More information about the User mailing list