% MINERVA (c) IF Computer 1996,97 % http://www.ifcomputer.com/MINERVA mailto:support@ifcomputer.com % file: example1.min :- package(gui). :- package(mystuff). :- package(property). main(Applet, Args) :- textArea_create(16, 60, OutputWindow), textComponent_setEditable(OutputWindow,false), container_add(Applet, 'Center', OutputWindow), textArea_getOutputStream(OutputWindow, Output), set_output(Output), set_error(Output), run_add3, property(Args). run_add3 :- write('add3(10,11,12) returned: '), add3(10,11,12,X), writeq(X), nl, flush_output. property(Args) :- write(Args),nl,flush_output, p(system_getProperties(_)), p(system_getProperty('my.parameter',unknownParam,_)), p(system_getProperty('java.version',_)), p(system_getProperty('java.vendor',_)), p(system_getProperty('java.vendor.url',_)), p(system_getProperty('java.home',_)), p(system_getProperty('java.class.version',_)), p(system_getProperty('java.class.path',_)), p(system_getProperty('os.name',_)), p(system_getProperty('os.arch',_)), p(system_getProperty('os.version',_)), p(system_getProperty('file.separator',_)), p(system_getProperty('path.separator',_)), p(system_getProperty('line.separator',_)), p(system_getProperty('user.name',_)), p(system_getProperty('user.home',_)), p(system_getProperty('user.dir',_)), !. p(Goal) :- catch(Goal,AnyError,sorry(Goal,AnyError)), writeq(Goal), nl, flush_output, !. sorry(Goal,AnyError) :- println(['Oooops: ', quoted(Goal)]), println(['caused: ', quoted(AnyError)]), flush_output.