Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] [SOLVED] What is the function, for (increment ++)? and where did it come from?

 
  • 0 Vote(s) - 0 Average
Pawn [SOLVED] What is the function, for (increment ++)? and where did it come from?
PutuSuhartawan
Offline

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#1
2021-05-07, 02:13 AM (This post was last modified: 2021-05-07, 12:31 PM by PutuSuhartawan.)
SOLUTION  by AbyssMorgan :
Code:
Pawn have only for, while and do while loops.
foreach is function maked by developers in foreach.inc standalone y_foreach aka y_iterate or FoxForeach.inc

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

for(new i = 0; i < 10; i += 2)

for(new i = 0, j = strlen(stringvar); i < j; i++)

What is the function, for (increment ++)? and where did it come from? is that function from include?

at first I thought the function, "for" was made by foreach include. I was wrong, is this the default function of the pawn language? Can you explain why the language in "for" is different in general? and is it really different for the "for" and "foreach" functions?
AbyssMorgan
Offline

Burgershot Member
Posts: 63
Threads: 25
Joined: Apr 2021
Reputation: 8
Location: Poland
#2
2021-05-07, 05:16 AM (This post was last modified: 2021-05-07, 05:17 AM by AbyssMorgan.)
Pawn have only for, while and do while loops.
foreach is function maked by developers in foreach.inc standalone y_foreach aka y_iterate or FoxForeach.inc

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

[color=#333333][size=small][font=Monaco, Consolas, Courier, monospace]for(new i = 0; i < 10; i += 2)[/font][/size][/color]

for(new i = 0, j = strlen(stringvar); i < j; i++)
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode