|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Pre-Load Arrays in EasyC, Possible?
Can anyone tell us if it is possible to pre-load your array with constant values in easyC? We want to create a lookup table and just need to create a single dimension array and load it with constants.
We have tried to define the constants as show in the screen shot. Look at "power[3]" It's a 1 x 4 array and when we set the value field to something like 0,0,0,0 we get an Error: 1 when we try and compile this. If we leave it value field blank, such as the variable "sign[3]" then it will compile just fine. We have tried formatting the value field: 0,0,0,0 {0,0,0,0} (0,0,0,0) The only thing that seems to work is leave it blank, then in code somewhere we have to do this: power[0] = value0 power[1] = value1 power[2] = value2 power[3] = value3 (or write a loop to load up several constants...) Is this the only way to pre-load the arrays in EasyC? |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| EasyC Wish List | dcbrown | Programming | 32 | 14-08-2006 09:24 |
| Battery Life, 50A load discharge test method/results | Dale(294engr] | Electrical | 5 | 22-01-2006 09:14 |
| EasyC v2.0 is mandatory for FVC! | skimoose | FIRST Tech Challenge | 7 | 14-01-2006 18:37 |
| Kickoff easyC workshop integrated into EasyC help file | Dan Larochelle | Programming | 0 | 11-01-2006 06:12 |