We are trying to decipher some rule syntax and are unsure of its origin.
Here is an example:
(CARS->TYPE='C').and.(CARS->CD_CODE<>'').and.('|'+INVOICE->TYPE+'|'$'|AAA|').and.('|'+SUBSTR(INVOICE->TYPE,1,2)+'|'$'|11|')
Specifically we are trying to understand |
and $
. Can anyone let me know if they have seen similar and elude to the source language or the correct interpretation of the |
and $
?
From it's syntax we can tell it is a "modern" language. Remember "modern" alright ;)
substr
.and.
->
are pretty modern, in compare with cobol and assembling language.
(CARS->TYPE='C').and.(CARS->CD_CODE<>'').and.('|'+INVOICE->TYPE+'|'$'|AAA|').and.('|'+SUBSTR(INVOICE->TYPE,1,2)+'|'$'|11|')
A pseudo code would be something as:
(if car type is 'C'
and
if car cd_code is not empty
and
if invoice type is 'AAA'
and
if invoice type first 2 letters are '11')
then return true
My guess about using $ would be:
= and <> are only when compare against a character
$ when compare array of character, i.e. strings.
(I don't know what the output would be, as it compares the entire invoice type with AAA and even with the first two letters as 11. Maybe you have edited the code before submitting it?)
Fortran 90 would be a guess, but even DBase III maybe.
DBase link: http://lynnbob.com/bob/articles/DBASEIIIPlusLevel2.htm
Fortran link: http://www.ews.uiuc.edu/~mrgates2/docs/fortran.html
For DBASE regarding the pipes...
If you pass parameters, they must be delimited by | | (pipes). The pipes, ||, are required even if no parameters are passed. If you pass parameters, they are delimited within the ||.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With