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
Handling decrementing for...next loop indices

 
Post new topic   Reply to topic    Forum Index -> ZBasic Language
Author Message
sparxfly



Joined: 19 Dec 2005
Posts: 4
Location: New Zealand

Posted: 14 January 2006, 18:36 PM    Post subject: Handling decrementing for...next loop indices Reply with quote

Converting my project across from BasicX to ZBasic, I am getting warnings where I use for...next loops with decrementing loop indices.
They worked fine for BasicX, seem also work fine for ZBasic.
Looks like the error checker doesn't correctly handle decrementing indices.

eg
public const windqsize as byte = 60
dim loopctr as byte

for loopctr = windqsize to 1 step -1
...
...
next

Gives...Warning: For loop will never be executed
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 14 January 2006, 20:11 PM    Post subject: Reply with quote

Quote:
Looks like the error checker doesn't correctly handle decrementing indices.


Version 1.1.0 does indeed have that problem. The problem was fixed about a week ago and the testing of the solution (along with some other changes) is nearly completed.

We expect to post an update soon, perhaps this next week. To work around the problem in the interim, add the line below to the top of your .pjt file:

Code:
--optimize=no-unreachable-code
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