Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Program Memory Data Initialization

 
Post new topic   Reply to topic    Forum Index -> ZBasic Language
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 Reply with quote

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: Reply with quote

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: Reply with quote

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: Reply with quote

Thanks for pointing this out. We'll post an update to the compiler as soon as the testing is completed.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZBasic Language Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group