Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

V6-not-optim, V6-Debug, and V6-optimised give not the same nested FOR-NEXT execution

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-04-2008, 05:04 PM
Junior Member
 
Join Date: Aug 2007
Location: France Nantes
Posts: 34
Question V6-not-optim, V6-Debug, and V6-optimised give not the same nested FOR-NEXT execution

Pasting a current job from V580 to V6 i found a new infinite loop.
Searching a solution i found two different results in nested FOR-NEXT loop execution.
Between Debug mode or normal compilation and, the Optimised compilation.
This last forbids (or dont take care, the same thing) to modify a for-next-loop variable inside the loop !
That is new, its more strong severity than Ada.

Would you see the next script :
'---------------------------------------
'listbox1 declared
Sub test
For n =1 To 6
For p = 1 To 5
listbox1.Add("____n=" & n & " p=" & p)
If p = 2 Then : p=4 : listbox1.Add(" p=2 change_to p=4 ") : End If
If n = p Then : listbox1.Add(n & " [n = p decide_to EXIT_n]") : Exit : End If
Next
Next
End Sub
'-----------------------------------------
And the joint result files.

So, as you want, but it could be great that the help inside b4ppc be update with the release and
the DEBUG run same as the Super fast & Extra-compacted-code Optimised_Compiler....
thanks for help.
Attached Images
File Type: jpg Image3.jpg (18.7 KB, 20 views)
Reply With Quote
  #2 (permalink)  
Old 01-04-2008, 07:17 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

It is a bug.
It will be fixed in the next update.

A workaround for now is to use a global variable as the for-next index.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Event difference between IDE and optimised agraham Beta Versions 5 08-30-2008 01:43 PM
possible to give values to arrays in Sub Globals? Stellaferox Questions (Windows Mobile) 2 02-17-2008 12:10 PM
Pause the execution of a program? HARRY Questions (Windows Mobile) 3 12-19-2007 02:57 PM
Give me an idea conf Questions (Windows Mobile) 6 07-03-2007 06:18 PM


All times are GMT. The time now is 01:45 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0