Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RamblinWreck

macrumors regular
Original poster
I need to make a small change to a legacy DB program. This program uses a some basic and C programming. I'm having trouble understanding this statement:

if !weekReport$'Y'

weekReport is a field within the database that can be set to yes/no depending on if the report has been run. I'm new at both of these languages so any help would be appreciated.
 
! = not, in most languages. It's been ages since I wrote any BASIC, but I would read that statement as:

If weekReport is not 'Y'


Hope that helps.
 
Give some additional information. What BASIC dialect? What database system? Where does this code appear? I don't really see an operator between the variable and 'Y' there if the $ is just part of the variable name weekReport$ denoting it's a string.

-Lee
 
I too thought that the ! is not. Just as with Java and several other languages. The if loops within this statement seem to contradict it being a not statement.

I was unsure if the ! could be used as an access parameter to the dbf file
 
Give some additional information. What BASIC dialect? What database system? Where does this code appear? I don't really see an operator between the variable and 'Y' there if the $ is just part of the variable name weekReport$ denoting it's a string.

-Lee

Thanks for the response Lee. I'm trying to gather any documentation but am having trouble finding any from the former developer at this point.

It appears that this program started with Clipper and was expanded. Basically 30 or so PRG files which are accessed from an exe. The backend database is a dbf file.
 
The ! could mean anything. It could be an operator, a sigil, a delimiter, anything.
http://en.wikipedia.org/wiki/Sigil_(computer_programming)

Without knowing more about exactly what the language or product actually is, everyone (including you) is just guessing. More info is needed, like a product name, a copyright date (to place it in a version history), etc.

Some code segments might also be useful. Wild-ass guessing with so little context is the worst of all possible guessing.

It's probably not Forth's store operator, which is !, but other than that, I wouldn't bet on anything.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.