Note that "," and ";" are also infix operators.
A functor is a non-numeric constant that is written as if it was a function. It is called a funct_or because it is just a formula and may never be evaluated - it is just a way to label the kind of structure involved. For example here are two facts that might appear in a Prolog database and/or program:
?- married(dick,Y).
Y= wife(dick),for us. But wife(dick) will not match wife(X) with any structure that doesn't have 'wife' in front:
married(dick, tricia)?
*NoClever programming of special predicates (para-modulation) can express out intuitive understanding that
Some commands interpret some of the structures in special ways. For example, A predicate input as a fact is stored as piece of data, but input as a command or goal it becomes a call to a procedure. A clause is also stored by Prolog but then it can act as a subprogram that can be called as a command, or as part of another command.
Associated with each functor in a compound term is the number of arguments it has. This is called its arity([sic] "arity"). An atom can different definitions for different arities.
. . . . . . . . . ( end of section Syntax) <<Contents | End>>
Quick reference lists
bagof, between, block, break,
call, call, call_dll_function, call_shared_object_function, character_count, chdir, checklist, clause, clause, clause_property, close, close_dde_conversation, close_dll, close_shared_object, compare, compiling, compound, concat, concat_atom, consult, context_module, convert_time, copy_term, current_arithmetic_function, current_atom, current_flag, current_foreign_library, current_functor, current_input, current_key, current_module, current_module, current_op, current_output, current_predicate, current_stream,
dde_current_connection, dde_current_service, dde_execute, dde_register_service, dde_request, dde_unregister_service, debug, debugging, default_module, delete, delete_file, discontiguous, display, displayq, dwim_match, dwim_predicate, dynamic,
ed, ed, edit, edit, edit_source, ensure_loaded, erase, exception, exists_directory, exists_file, exit, expand_file_name, expand_file_search_path, expand_term, explain, explain, export, export_list,
fail, feature, file_base_name, file_directory_name, file_search_path, fileerrors, findall, flag, flatten, float, flush, flush_output, forall, foreign_file, format, free_variables, functor,
garbage_collect, gensym, get, get, get0, get_single_char, get_time, getenv, ground,
halt, hash_term, help, history_depth,
ignore, import, index, initialization, int_to_atom, integer, intersection, is, is_absolute_file_name, is_list, is_set,
keysort,
last, leash, length, library_directory, limit_stack, line_count, line_position, list_to_set, listing, load_foreign, load_foreign_library,
make, make_fat_filemap, make_library_index, maplist, member, merge, merge_set, module, module_transparent, msort, multifile,
name, nl, nodebug, nonvar, noprotocol, nospy, nospyall, not, notrace, nth0, nth1, nth_clause, number, number_chars, numbervars,
once, op, open, open_dde_conversation, open_null_stream, open_shared_object,
phrase, please, plus, portray, portray_clause, predicate_property, predsort, preprocessor, print, profile, profile_count, profiler, prolog, prolog_current_frame, prolog_frame_attribute, prolog_load_context, prolog_skip_level, prolog_to_os_filename, prolog_trace_interception, prompt1, prompt, proper_list, protocol, protocola, protocolling, put,
qcompile, qload, qsave_program, qsave_program,
read, read_clause, read_history, read_link, read_variables, recorda, recorded, recordz, redefine_system_predicate, rename_file, repeat, require, reset_profiler, restore, retract, retractall, reverse,
same_file, save, save_program, save_program, see, seeing, seen, select, set_feature, set_input, set_output, set_tty, setarg, setenv, setof, sformat, shell, show_profile, sleep, sort, source_file, source_location, spy, stack_parameter, statistics, stream_position, string, string_length, string_to_atom, string_to_list, style_check, sublist, subset, substring, subtract, succ, swritef,
tab, tell, telling, term_expansion, term_to_atom, time, time_file, tmp_file, told, trace, tracing, trim_stacks, true, tty_get_capability, tty_goto, tty_put, ttyflush,
union, unknown, unload_foreign_library, unsetenv, use_module, use_module,
var, visible, volatile
wait_for_input, wildcard_match, write, write_ln, writef, writeq,
Arithmetic
*, **, +, -, -, /, //, /\, <<, >>, 'C', \, \/, ^,
abs, acos, asin, atan, atan, ceil, ceiling, cos, cputime, e, exp, float, float_fractional_part, float_integer_part, floor, integer, log, log10, max, min, mod, random, rem, round, truncate, pi, sign, sin, sqrt, tan, xor,
Operators
discontiguous, dynamic, module_transparent, multifile, volatile, initialization,
:-, ?-, -->, :-,
. . . . . . . . . ( end of section Quick reference lists) <<Contents | End>>
See also
[ comp.ascii.html ]
[ sum.html ]