Re: 'code too large' error with 2D array
From: Anthony Borla (ajborla_at_bigpond.com)
Date: 10/31/03
- Next message: Christophe Vanfleteren: "Re: 'code too large' error with 2D array"
- Previous message: Mac: "'code too large' error with 2D array"
- In reply to: Mac: "'code too large' error with 2D array"
- Next in thread: Christophe Vanfleteren: "Re: 'code too large' error with 2D array"
- Reply: Christophe Vanfleteren: "Re: 'code too large' error with 2D array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 31 Oct 2003 08:26:04 GMT
Mac,
"Mac" <lojurk@wp.pl> wrote in message
news:8a425078.0310302348.69edde89@posting.google.com...
>
> Hi!. I've got following problem. The matter concerns
> 2D array filled with ints. Size: no of rows: 2000, no.
> of columns: 20. I have to process it in whole piece at
> one runtime cycle of the program. But here comes my
> problem. On my pasting the whole array into the code
> of it, then compiling, I get following error:
>
> ' Error no. 5. Code too large'.
>
> Tried to change the type of the array to long but
> to no avail. Everything works fine up to:
>
> no. of rows: 400 and no. of columns: 20.
>
> What's going on?. Can I get around it somehow?.
>
You're choking the compiler with too much source code ;) !!!
>
> I think about puting the array into separate file or
> groups of files(text file?) but how to put
> it inside the program?. Maybe there is some other
> easier solution?.
>
Loading the array from a text file sounds perfectly fine to me, and is quite
straightforward:
* Allocate requisite array
* Open a file stream and commence the read stream / load array
cycle
* Close file stream, and start array processing
Easy !!!
Why would you want to include the array data in the source code, anyway -
security reasons such as avoiding tampering of the data by outsiders ? If
so, a simple option is to place the text file in the '.jar' file you are
using to distribute your program. There were a couple of posts on this
[accessing resources in a '.jar' file] recently.
I hope this helps.
Anthony Borla
- Next message: Christophe Vanfleteren: "Re: 'code too large' error with 2D array"
- Previous message: Mac: "'code too large' error with 2D array"
- In reply to: Mac: "'code too large' error with 2D array"
- Next in thread: Christophe Vanfleteren: "Re: 'code too large' error with 2D array"
- Reply: Christophe Vanfleteren: "Re: 'code too large' error with 2D array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|