解读这是什么语言或语法

Mik*_*e T 5 programming-languages

我们试图破译一些规则语法,并且不确定它的来源.

这是一个例子:

(CARS->TYPE='C').and.(CARS->CD_CODE<>'').and.('|'+INVOICE->TYPE+'|'$'|AAA|').and.('|'+SUBSTR(INVOICE->TYPE,1,2)+'|'$'|11|')
Run Code Online (Sandbox Code Playgroud)

具体来说,我们正在努力理解|$.任何人都可以告诉我,如果他们已经看到类似的和躲避源语言或正确解释|$

MrS*_*ind 1

从它的语法我们可以看出它是一种“现代”语言。记住“现代”好吧;)

substr
.and. 
-> 
Run Code Online (Sandbox Code Playgroud)

与 cobol 和汇编语言相比,它们相当现代。

(CARS->TYPE='C').and.(CARS->CD_CODE<>'').and.('|'+INVOICE->TYPE+'|'$'|AAA|').and.(' |'+SUBSTR(发票->类型,1,2)+'|'$'|11|')

伪代码如下:

(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
Run Code Online (Sandbox Code Playgroud)

我对使用 $ 的猜测是:

= and <> are only when compare against a character
$ when compare array of character, i.e. strings.
Run Code Online (Sandbox Code Playgroud)

(我不知道输出是什么,因为它将整个发票类型与 AAA 进行比较,甚至将前两个字母作为 11。也许您在提交之前已经编辑了代码?)

Fortran 90是一个猜测,但甚至DBase III也可能是这样。

DBase链接: http://lynnbob.com/bob/articles/DBASEIIIPlusLevel2.htm

Fortran 链接: http://www.ews.uiuc.edu/~mrgates2/docs/fortran.html

对于 DBASE 关于管道...

如果传递参数,它们必须用 | 分隔 | (管道)。即使没有传递参数,管道 || 也是必需的。如果传递参数,它们将在 || 内分隔。