pftq.com
Welcome! Please Login or Register!
November 21, 2024, 02:40:23 AM
Home Login Register
pftq Forums  |  Game Design  |  Age of Empires III  |  For loop incrementation by more than one 0 Members and 1 Guest are viewing this topic. « previous next »
Latest News!Lunar Trigger(Aug 27, 2023)
Pages: [1] Print
Author Topic: For loop incrementation by more than one  (Read 31283 times)
Neuron
Member
*****
Offline Offline

Posts: 30

« on: July 03, 2013, 10:55:53 AM »

@pftq

Did you find a way to make a for loop run by an increment of 2?

This doesn't work:

Code:
for(i=1;i<=X;i+=#) where X is number of times and # is increment

The usual C++ syntax is rejected too

Code:
for (int i=0; i < 10; i++)

Using i = i +2 at the end of the loop is also rejected by the interpreter.

I thought this was a sort of C/C++ implementation, but it doesn't accept common C syntax.
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #1 on: August 31, 2013, 07:02:49 PM »

I've never actually tried.  I wouldn't be surprised though.  Hopefully doesn't impede things too much
Logged
Pages: [1] Print 
pftq Forums  |  Game Design  |  Age of Empires III  |  For loop incrementation by more than one « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines | RSS Feed Valid XHTML 1.0! Valid CSS!
Page created in 0.07 seconds with 21 queries.