|
|
| Author |
Message |
cloxwerx
Joined: 01 Dec 2005
Posts: 37
Location: Tucson, Arizona
|
|
Posted: 01 December 2005, 17:49 PM Post subject: Program Memory Data Initialization |
|
|
I just received a ZX-24 and began working with the IDE. Taking a BX-24 program that functions I tried to recompile it with “Option Language BasicX” compatibility. It received errors on IntegerTableData definitions so I went to no compatibility. In using the Program Memory Data Initialization I find that a negative integer won’t work in the initialization string and had to go to the following:
Public TEMPERATURE As New IntegerTableData ({
' Sensor Temperature
4481, &hfff3 '-13
4357, &hfffc '-4
4211, 5
4047, 14
......
Is there a way to directly specify negative values without the compiler complaining about the wrong number of values per line?
Thanks,
Dennis |
|
| Back to top |
|
 |
mikep
Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX
|
|
Posted: 01 December 2005, 18:02 PM Post subject: |
|
|
It looks like a minor problem in the compiler. Don is very responsive so I'm sure you will see a fix soon. In the meantime try this:
| Code: | Private Const x as Integer = -13
Private Const y as Integer = -4
Public TEMPERATURE As New IntegerTableData ({
' Sensor Temperature
4481, x
4357, y
4211, 5
4047, 14
}) | Using constants for this kind of read-only data might be a good idea in any case for readability and maintainability of your code.
Mike
http://home.austin.rr.com/perks/micros/
Last edited by mikep on 04 December 2005, 19:32 PM; edited 1 time in total |
|
| Back to top |
|
 |
cloxwerx
Joined: 01 Dec 2005
Posts: 37
Location: Tucson, Arizona
|
|
Posted: 01 December 2005, 18:26 PM Post subject: |
|
|
Thanks for the work-around idea, Mike.
Dennis |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR
|
|
Posted: 01 December 2005, 18:47 PM Post subject: |
|
|
| Thanks for pointing this out. We'll post an update to the compiler as soon as the testing is completed. |
|
| Back to top |
|
 |
|