extracts the first character from a string
frontchar("Hello",Char,RestString)
frontchar(String,Char,RestString) (i,x,x) (o,i,i)
string(String) (x) string to be separated
char(Char) (x) first character of string
string(RestString) (x) string without its first character
This establishes a relation between String, Char, and RestString, thus that String = Char+RestString. The arguments must be sufficiently initalized, so that all three arguments can be determined.
frontchar("Hello",C,R), frontchar(Str,C,R), write(Str),nl.
A runtime error occurs if the arguments belong to the wrong domain. Fails in case of insufficiently initialised arguments or if the relation cannot be established.
prolog-process, client-server, object
frontstr , str_char , fronttoken , prologtoken , concat