forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

goto in Luaplayer ?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
Julu Julu



Joined: 01 Nov 2005
Posts: 9
Location: Germany

PostPosted: Sun Nov 13, 2005 6:27 am    Post subject: goto in Luaplayer ? Reply with quote

Hi.

In the programming language C, there is an instruction -> goto

Has Luaplayer this instruction ?

Example:
Code:

for x=0,100 do
   for y=0,100 do
      if y == 50 then
         goto abc
      end
   end
end

abc:
...


How can i break the 2 for's?
Back to top
View user's profile Send private message
KawaGeo



Joined: 27 Aug 2005
Posts: 191
Location: Calif Mountains

PostPosted: Sun Nov 13, 2005 6:36 am    Post subject: Reply with quote

Nope. Use "break" instead.

Note: one break from the inner loop. You need another break for the next loop if necessary.
_________________
Geo Massar
Retired Engineer
Back to top
View user's profile Send private message Send e-mail
chaos



Joined: 10 Apr 2005
Posts: 135

PostPosted: Sun Nov 13, 2005 9:35 am    Post subject: Reply with quote

functions are your friend.. why not use one of those instead?
_________________
Chaosmachine Studios: High Quality Homebrew.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group