It is currently Wed Jul 17, 2019 9:43 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: ForEach should be better documented.
PostPosted: Thu Nov 29, 2018 12:45 am 
Offline
Addict
Addict
User avatar

Joined: Wed Feb 17, 2010 12:00 am
Posts: 1324
Location: (Embarrassed to say country)
ForEach should be documented that it uses a shared pointer when using a global list...

Code:

Global NewList fish()

Procedure t(n)
  n = 0
  ForEach fish()
    Debug "Fish() "+fish()
    n+1
    Delay(1)
  Next
  Debug "Fish() total "+n
EndProcedure

For x = 1 To 10
  AddElement(fish()) : fish()=x
Next

h = CreateThread(@t(),0)
i = 0

ForEach fish()
  Debug "Main "+fish()
  i+1
  Delay(1)
Next
Debug "Main total "+i

Repeat : Delay(1) : Until IsThread(h)=#False


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye