Off topic question
-
- Posts: 54
- Joined: Fri Oct 21, 2005 10:45 am
- Location: Russia, Moscow
- Contact:
Off topic question
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
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
- Location: Russia, Moscow
- Contact:
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.
http://hyperupload.com/download/f5d4dc8 ... O.EXE.html
http://hyperupload.com/download/9298168 ... O.PRG.html
Vladimir Grigoriev.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 54
- Joined: Fri Oct 21, 2005 10:45 am
- Location: Russia, Moscow
- Contact:
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
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
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
-
- Posts: 54
- Joined: Fri Oct 21, 2005 10:45 am
- Location: Russia, Moscow
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
-
- Posts: 54
- Joined: Fri Oct 21, 2005 10:45 am
- Location: Russia, Moscow
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
-
- Posts: 54
- Joined: Fri Oct 21, 2005 10:45 am
- Location: Russia, Moscow
- Contact:
-
- Posts: 54
- Joined: Fri Oct 21, 2005 10:45 am
- Location: Russia, Moscow
- Contact:
-
- Posts: 54
- Joined: Fri Oct 21, 2005 10:45 am
- Location: Russia, Moscow
- Contact: