Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by AndrewAMD. 12/05/23 10:56
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip, Quad), 622 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
continue in for loop #146011
08/05/07 18:36
08/05/07 18:36
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
Shouldn't using 'continue' in a for loop terminate the current iteration and jump to it's increment expression? In LiteC it only terminates without incrementing.
Anyone know anything about this? Am I right or wrong?

Re: continue in for loop [Re: sheefo] #146012
08/07/07 13:22
08/07/07 13:22
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
Does anyone give a crap about for loops? There are useful but not properly implemented in LiteC. They should be able to define variables, like..
Code:

for(int i = 0; i < n; i++)


... but they can't. Also, the continue statement does not increment 'i', it just re-does the current loop.

WHY IS THIS HAPPENING!?

Re: continue in for loop [Re: sheefo] #146013
08/07/07 14:03
08/07/07 14:03
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
Defining a variable inside a for loop is a C++ only feature (not C), but it would be a nice addition to Lite-C.

A continue inside a for loop should indeed jump to the test and perform the iteration, so that might be a bug.

Re: continue in for loop [Re: Excessus] #146014
08/07/07 14:39
08/07/07 14:39
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
Thank you soo much Exessus!

I can live without defining variables in the for loop and I hope this 'continue' bug is fixed in the next version... I'll mention it in the public beta test topic.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1