Jump to content

Question


mjau

Recommended Posts

Posted
t = 
{ 
    'next'; 
    'some'; 
    'etc'; 
} 
  
for i,v in pairs( t ) do 
   if v == 'some' then 
     print ( i,'v == some' ) 
     break 
   end 
end 
  
print 'done' 
  
-- some code 

Output:

2,v == some

done

I think you understand.

You can test this example in lua demo.

http://www.lua.org/cgi-bin/demo

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...