Syntax Question on Old DB program

Discussion in 'Mac Programming' started by RamblinWreck, Jul 9, 2010.

  1. RamblinWreck macrumors regular

    RamblinWreck

    Joined:
    Jul 4, 2008
    #1
    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.
     
  2. JackRipper macrumors regular

    JackRipper

    Joined:
    May 14, 2002
    Location:
    South Carolina
    #2
    ! = 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.
     
  3. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #3
    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
     
  4. RamblinWreck thread starter macrumors regular

    RamblinWreck

    Joined:
    Jul 4, 2008
    #4
    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
     
  5. RamblinWreck thread starter macrumors regular

    RamblinWreck

    Joined:
    Jul 4, 2008
    #5
    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.
     
  6. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #6
    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.
     

Share This Page