FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper Off topic question
Posts: 54
Joined: Fri Oct 21, 2005 10:45 AM

Off topic question

Posted: Mon Mar 20, 2006 11:05 AM

Hi.
I am writing a class on pure Clipper for searching files (including LFN files) on disk. (A simple intermediate demo I have included)
The class is based on well-known DOS functions FindFirstFile and FindNextFile.
My question is about naming conversion. I need a help from english-spoken men. How is better to name an instant variable? I will try to explain my idea.
A class object can be in two state. One state is when there is not any seach method executed yet. And another state is when at least one search method was executed. For example

The first state

DEFINE FILESEEK oFileSeek FILESPEC cFileSpec SEARCH ATTRIBUTE "D" LFN

The second state

DEFINE FILESEEK oFileSeek FILESPEC cFileSpec SEARCH ATTRIBUTE "D" LFN

oFileSeek:search() // i.e in this case at least one searching is done

So how to name a logical variable which will say if at least one searching is done or not?

Vladimir Grigoriev

Posts: 54
Joined: Fri Oct 21, 2005 10:45 AM

Off topic question

Posted: Mon Mar 20, 2006 01:19 PM
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Off topic question

Posted: Mon Mar 20, 2006 01:37 PM

Vladimir,

maybe DATA lDone ?

lDone = .t. after the search

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 54
Joined: Fri Oct 21, 2005 10:45 AM

Off topic question

Posted: Mon Mar 20, 2006 02:14 PM

Thanks Antonio.
However IMHO lDone may be incorrectly understood.
For example, a program searches in cycle all files whish are started with "somefiles*". And lDone may be interpretated that there is nothing more to search i.e we found all we want.
But I would like to say with the instant variable that no any search method was executed. That I only defined an object but did not yet do any real seaching.
Vladimir Grigoriev

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Off topic question

Posted: Mon Mar 20, 2006 02:24 PM

lExecuted? lStarted?

EMG

Posts: 54
Joined: Fri Oct 21, 2005 10:45 AM

Off topic question

Posted: Mon Mar 20, 2006 02:30 PM

Thanks Enrico.
lExecuted is more suitable.
I wil wait a little. Maybe another suggestions will be.
Vladimir Grigoriev

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 54
Joined: Fri Oct 21, 2005 10:45 AM

Off topic question

Posted: Mon Mar 20, 2006 02:58 PM

I don't like lCompleted and lFinished on the same reason as lDone.
Also I think over lNew and something similar...
Vladimir Grigoriev

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 54
Joined: Fri Oct 21, 2005 10:45 AM

Off topic question

Posted: Mon Mar 20, 2006 03:08 PM

O'k. It is more closely. :)

Posts: 54
Joined: Fri Oct 21, 2005 10:45 AM

Off topic question

Posted: Mon Mar 20, 2006 03:09 PM

And what about the class in whole? Any opnions?

Posts: 54
Joined: Fri Oct 21, 2005 10:45 AM

Off topic question

Posted: Tue Mar 21, 2006 09:08 AM

Yesterday I remembered about such usefull word in xBase language as Used. I thing it is a right word in the context of my class. :)

Posts: 48
Joined: Tue Dec 27, 2005 12:40 PM

Searching

Posted: Tue Mar 28, 2006 01:55 AM

Whatabout lFoundAll