Common Lisp Unbound Variable -


is possible use uninitialized variable function argument? assignment, have use clos write semantic network system, , professor included test function test our output, , 1 of them specifies:

(print (def-concept human)),

which implies passing argument human function def-concept. when running test function, cannot away error (in allegro cl):

error: attempt take value of unbound variablehuman'.`

as first function in test, there no initializing of variables before this. there way around passing uninitialized variable argument of function?

thanks in advance.

it not possible use unitialized value function argument in regular common lisp function call. common lisp uses eager evaluation: argument expressions reduced values before function call takes place.

i suspect maybe don't understand structure of homework assignment.

if def-concept function expects value, , human not defined, cannot test function.

perhaps expected define variable human , load file containing (print (def-concept human)).

just because there nothing prior form in same file doesn't mean no prior evaluation possible. other files can loaded before file, or forms evaluated in listener.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -