A basic tuple operation
t := [t1,t2]
concatenate tuples
i := |t|
get number of elements of tuple t
v := t[i]
select element i of tuple t; 0 <= i < |t|
t := t[i1:i2]
select from element i1 to element i2 of tuple t
t := subset(t,i)
select elements specified in i from t
t := remove(t,i)
remove elements specified in i from t
i := find(t1,t2)
get indices of all occurrences of t2 within t1 (or -1 if no match)
t := uniq(t)
discard all but one of successive identical elements from t
In the following examples the variable Var contains [2,2,3,'a','a',2,3,'b','b']:
[3,Var,[8,9]] =[3,2,2,3,'a','a',2,3,'b',b',8,9]
|Var| =9
Var[4] ='a'
Var[4:6] =['a',2,3]
subset(Var,[3,6,7]) =['a',3,'b']
remove(Var,[3,6,7]) =[2,2,3,'a',2,'b']
find(Var,[2,3]) =[1,5]
uniq(Var) =[2,3,'a',2,3,'b']
Tuple Creation
assign ([],empty_tuple)
assign (4711,one_integer)
assign ([4711,0.815],two_numbers)
=》
empty_tuple := []
one_integer := 4711
two_numbers := [4711,0.815]
Basic Arithmetic Operations
a1 / a2 =division =》tuple_div =》tuple_div( : : Q1, Q2 : Quot)
a1 * a2 =multiplication =》tuple_mult =》tuple_mult( : : P1, P2 : Prod)
a1 % a2 =modulus =》tuple_mod =》tuple_mod( : : T1, T2 : Mod)
a1 + a2 =addition =》tuple_add =》tuple_add( : : S1, S2 : Sum)
a1 - a2 =subtraction =》tuple_sub =》tuple_sub( : : D1, D2 : Diff)
-a =negation =》tuple_neg =》tuple_neg( : : T : Neg)
String Operations
v$s= convert v using specification s
v1 + v2= concatenate v1 and v2
strchr(s1,s2)= search character s2 in s1
strstr(s1,s2)= search substring s2 in s1
strrchr(s1,s2)= search character s2 in s1 (reverse)
strrstr(s1,s2)= search substring s2 in s1 (reverse)
strlen(s)= length of string =》tuple_strlen( : : T1 : Length)
s{i}= select character at position i; 0 <= i <= strlen(s)
s{i1:i2}= select substring from position i1 to position i2
split(s1,s2)= split s1 in substrings at s2
regexp_match(s1,s2)= extract substrings of s1 matching the regular expression s2
regexp_replace(s1,s2,s3)= replace substrings of s1 matching the regular expression s2 with s3
regexp_select(s1,s2)= select tuple elements from s1 matching the regular expression s2 regexp_test(s1,s2)= return how many tuple elements in s1 match the regular expression s2
=》
Comparison Operations
大于tuple_greater( : : T1, T2 : Greater)
小于等于tuple_less_equal( : : T1, T2 : Lesseq)
大于等于tuple_greater_equal( : : T1, T2 : Greatereq)
等于tuple_equal( : : T1, T2 : Equal)
不等于tuple_not_equal( : : T1, T2 : Nequal)
Boolean Operations
与tuple_and( : : T1, T2 : And)
Compute the logical exclusive or of two tuples=》tuple_xor( : : T1, T2 : Xor)
或tuple_or( : : T1, T2 : Or)
非tuple_not( : : T : Not)
Trigonometric Functions
Exponential Functions
Numerical Functions
Miscellaneous Functions