Welcome, Guest. Please login or register.

Author Topic: BlitzMax :+ operator  (Read 2782 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show all replies
BlitzMax :+ operator
« on: September 12, 2007, 02:56:34 PM »
I know this isn't an Amiga language, but I'm porting something from BiltzMax to C++ which may eventually be ported to the Amiga. The code contains the operator :+ in a mathematical function. What is the meaning of this operator? I tried using :+ in C++ but got a warning from the compiler that the statement has no effect.

TIA

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show all replies
Re: BlitzMax :+ operator
« Reply #1 on: September 12, 2007, 04:27:26 PM »
I have just learned from an example that it is equivalent to += in C:

Quote
If you want to increase a variable, let say speed. You can write Speed = Speed + Acceleration Or in a shorter way Speed:+ Acceleration.


From here.

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10