generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Difference between pairs and ipairs

Previous Thread :: Next Thread 
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
24 Dec 2013 11:33 PM
What is the difference?
Report Abuse
shonclub is not online. shonclub
Joined: 05 Sep 2009
Total Posts: 1331
24 Dec 2013 11:34 PM
ipairs is for Apple. Cus it has that 'i'
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
24 Dec 2013 11:35 PM
Wow Apple is taking over roblox too?
Report Abuse
Azureous is not online. Azureous
Joined: 29 Jan 2012
Total Posts: 25287
24 Dec 2013 11:56 PM
pairs:
Returns three values: the next function, the table t, and nil, so that the construction
ipairs:
Returns three values: an iterator function, the table t, and 0, so that the construction

Example of usage in script:

for i, v in pairs() do
--code
end

for i, v in ipairs() do
--code
end

Essentially though, pairs iterates through all key value pairs of a table and ipairs iterates through the key value pairs until it reaches a value that doesn't exist in the table.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image