Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Martin Krivka
  Where is Martin Krivka?
 
 Czech Republic
 Martin Krivka
 To: Mustapha Bihmouten
  Where is Mustapha Bihmouten?
 Casablanca
 Morocco
 Mustapha Bihmouten
 Tags
Subject: RE: SCAN WHILE not working with conditions
Thread ID: 331077 Message ID: 331160 # Views: 25 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Tuesday, December 27, 2011 1:56:58 PM         
   


Hello Mustapha,


> >
> > create cursor test (id i, cname c(15))
> > do while reccount()<1000
> > 	insert into test values (rand()*1000,sys(2015))
> > enddo
> > go top
> > 
> > scan while evaluate("fce1(id)")
> > endscan
> > 
> > function fce1(id)
> > 	?? "."
> > 

>
> Hello Martin
>
> no problemo concerning the interruption
> for each post, everyone is invited to discuss and share his point of view
> "au contraire" your example may enlight this post
>

Thanks !



>
> Evaluate("fce1(id)") : Yes, used that way it will always works 'cause the function do not return .T. or .F.
> it just prints dot until the scan reach the end of the table

No -:)
The function always return .T. (This is default value when no return command is present.)


>
> in case of an evaluation of fields or variables the "returning" result has an impact on the statement that call it
> at the time of the evaluation all depends on the active record or the state of variables

Yes, exactly. With the notice that eval() is faster than other methods. (Macro & for example.)


>
> Notes : "au contraire" means "contrariwise"
>
> Regards
> Mustapha Bihmouten



What seems strange for me is the command itself: scan while ... for ...

I had never seen/use similar construction. I'm not sure what have a precedence. While or For ?


Martin

ENTIRE THREAD

SCAN WHILE not working with conditions Posted by Cecil Champenois @ 12/26/2011 4:35:13 PM
RE: SCAN WHILE not working with conditions Posted by Mustapha Bihmouten @ 12/26/2011 4:57:18 PM
RE: SCAN WHILE not working with conditions Posted by Cecil Champenois @ 12/26/2011 5:04:12 PM
RE: SCAN WHILE not working with conditions Posted by Mustapha Bihmouten @ 12/26/2011 5:34:11 PM
RE: SCAN WHILE not working with conditions Posted by Cecil Champenois @ 12/26/2011 5:46:57 PM
RE: SCAN WHILE not working with conditions Posted by Mustapha Bihmouten @ 12/27/2011 11:34:01 AM
RE: SCAN WHILE not working with conditions Posted by Martin Krivka @ 12/27/2011 12:57:21 PM
RE: SCAN WHILE not working with conditions Posted by Mustapha Bihmouten @ 12/27/2011 1:41:37 PM
RE: SCAN WHILE not working with conditions Posted by Martin Krivka @ 12/27/2011 1:56:58 PM
RE: SCAN WHILE not working with conditions Posted by Anil Sharma @ 12/27/2011 1:59:29 PM
RE: SCAN WHILE not working with conditions Posted by Mustapha Bihmouten @ 12/27/2011 2:27:28 PM
RE: SCAN WHILE not working with conditions Posted by tushar @ 12/27/2011 2:40:27 PM
RE: SCAN WHILE not working with conditions Posted by Martin Krivka @ 12/27/2011 4:41:41 PM
RE: SCAN WHILE not working with conditions Posted by tushar @ 12/26/2011 7:42:37 PM
RE: SCAN WHILE not working with conditions Posted by Anil Sharma @ 12/26/2011 8:19:52 PM