E r g e b n i s / R e s u l t
Liefert einen Unterstring von einem anderen String
Returns a sub-string of another string
B e s c h r e i b u n g / D e s c r i p t i o n
This function returns a string of a given length from another string,
starting at a given position. The user tells the function how many
characters to return and where to start.
This function works in the same manner as the Programmer statement
EXTRACT. It is provided for users of Database Screen and Print forms.
S y n t a x
Code:
answer = call ('MID' , string , starting_position , length) P a r a m e t e r
string - is any string or constant
starting_pos - is an integer, specifying the starting point that the
sub-string starts.
length - is an integer, specifying the length of the string
returned.
If starting_pos is less than 0 then it is set to the start of the string.
If starting_pos is larger than the string, then it is set to the end of
the string.
If length is larger than the length of the string then the entire string
is returned from the starting point. If length is less than 0 then a
zero length string is returned.
R e t u r n s
Returns a string variable of the length passed to the function.
B e i s p i e l / E x a m p l e
Code:
attach 'string'
put call ('MID' , 'Test String' , 6 , 3) ! prints Str
a = 'AA Aerospace'
b = call ('MID' , a , 4 , 4) ! b contains 'Aero'
detach 'string' Q u e r v e r w e i s / R e f e r e n c e
RIGHT
LEFT
INITIALS