Off topic question

Vladimir Grigoriev
Posts: 54
Joined: Fri Oct 21, 2005 10:45 am
Location: Russia, Moscow
Contact:

Off topic question

Post by Vladimir Grigoriev »

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
Vladimir Grigoriev
Posts: 54
Joined: Fri Oct 21, 2005 10:45 am
Location: Russia, Moscow
Contact:

Post by Vladimir Grigoriev »

Here is URL for downloading the (very simple) example.
http://hyperupload.com/download/f5d4dc8 ... O.EXE.html
http://hyperupload.com/download/9298168 ... O.PRG.html

Vladimir Grigoriev.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Vladimir,

maybe DATA lDone ?

lDone = .t. after the search
regards, saludos

Antonio Linares
www.fivetechsoft.com
Vladimir Grigoriev
Posts: 54
Joined: Fri Oct 21, 2005 10:45 am
Location: Russia, Moscow
Contact:

Post by Vladimir Grigoriev »

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
Vladimir Grigoriev
Posts: 54
Joined: Fri Oct 21, 2005 10:45 am
Location: Russia, Moscow
Contact:

Post by Vladimir Grigoriev »

Thanks Enrico.
lExecuted is more suitable.
I wil wait a little. Maybe another suggestions will be.
Vladimir Grigoriev
Vladimir Grigoriev
Posts: 54
Joined: Fri Oct 21, 2005 10:45 am
Location: Russia, Moscow
Contact:

Post by Vladimir Grigoriev »

I don't like lCompleted and lFinished on the same reason as lDone.
Also I think over lNew and something similar...
Vladimir Grigoriev
Vladimir Grigoriev
Posts: 54
Joined: Fri Oct 21, 2005 10:45 am
Location: Russia, Moscow
Contact:

Post by Vladimir Grigoriev »

O'k. It is more closely. :)
Vladimir Grigoriev
Posts: 54
Joined: Fri Oct 21, 2005 10:45 am
Location: Russia, Moscow
Contact:

Post by Vladimir Grigoriev »

And what about the class in whole? Any opnions?
Vladimir Grigoriev
Posts: 54
Joined: Fri Oct 21, 2005 10:45 am
Location: Russia, Moscow
Contact:

Post by Vladimir Grigoriev »

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. :)
grumpy
Posts: 48
Joined: Tue Dec 27, 2005 12:40 pm
Location: Australia

Searching

Post by grumpy »

Whatabout lFoundAll
Post Reply