howto initialize a large array (4096 float elements) when "not enough memory for long line"

Hi,

I’m using Dynamic C V10.70 on Win XP for a RCM6700 target.
I’m trying to initialize a large float array as follow :

far float crosstable[4096]={
-250.000,-249.622,-249.244,-248.897,-248.606,-248.315,-248.025,-247.753,
-247.483,-247.213,-246.950,-246.714,-246.477,-246.241,-246.005,-245.782,
-245.560,-245.337,-245.115,-244.904,-244.705,-244.506,-244.307,-244.108,
-243.914,-243.725,-243.536,-243.347,-243.158,-242.970,-242.790,-242.610,
-242.430,-242.250,-242.070,-241.895,-241.723,-241.551,-241.380,-241.208,
-241.036,-240.870,-240.706,-240.541,-240.377,-240.213,-240.048,-239.884,
and so on until the last array element.

The compiler gives me the following message :
“not enough memory for long line”

I suppose it is a compiler line size limitation ? Am I true ?
Can it be changed ?

Thx.

You just remove backslash from array, and everything worked.


far const float crosstable[4096]= {-250.000,-249.622,-249.244,-248.897,-248.606,-248.315,-248.025,-247.753,
	                                -247.483,-247.213,-246.950,-246.714,-246.477,-246.241,-246.005,-245.782,
	                                -245.560,-245.337,-245.115,-244.904,-244.705,-244.506,-244.307,-244.108,
	                                -243.914,-243.725,-243.536,-243.347,-243.158,-242.970,-242.790,-242.610,
	                                -242.430,-242.250,-242.070,-241.895,-241.723,-241.551,-241.380,-241.208,
	                                -241.036,-240.870,-240.706,-240.541,-240.377,-240.213,-240.048,-239.884 };

void main() {
   int i;

   for(i=0; i

It works perfectly. In the past I used another compiler which force a single line written on multi lines to be ended by a backslash. Removing the backslashes in Dynamic C solve the problem.

Thx a lot.

Regards.