检测语言

时间:2018-12-21 10:58:39

标签: programming-languages

有人可以帮助检测该语言并描述此代码的作用吗?有点像ALGOL,但我不确定,谢谢。

 //BEGIN

 C_TEXT($1)  
 C_POINTER($2)  
 C_TEXT($3)  
 //
 //
 C_TEXT($TextToParse_t;$Delimiter_t;$Element_t)
 C_LONGINT($To_l;$From_l;$DQ1_i;$DQ2_i)
 C_POINTER($PtrToArray_p)
 //
 If (Count parameters>=3)
            $TextToParse_t:=$1
            $PtrToArray_p:=$2
            $Delimiter_t:=$3

            C_LONGINT($i;$Last)
            If (Size of array($PtrToArray_p->)>0)
                            DELETE FROM ARRAY($PtrToArray_p->;1;Size of array($PtrToArray_p->))
            End if 

            If ($TextToParse_t#"")
                            $From_l:=1
                            Repeat 
                                            $To_l:=Position($Delimiter_t;$TextToParse_t;$From_l)

                                            If ($To_l>0)
                                                            $Element_t:=Substring($TextToParse_t;$From_l;$To_l-$From_l)
                                                            APPEND TO ARRAY($PtrToArray_p->;$Element_t)
                                                            $From_l:=$To_l+Length($Delimiter_t)
                                            End if 
                            Until ($To_l<=0)

                            $Element_t:=Substring($TextToParse_t;$From_l)
                            APPEND TO ARRAY($PtrToArray_p->;$Element_t)

            End if 

如果结束

1 个答案:

答案 0 :(得分:2)

该代码来自4D语言。 所有文档都可以在这里找到。

http://doc.4d.com/4Dv17/4D/17/4D-Language-Reference.100-3729310.en.html