componentfolder = "./"; addhelp(components,"No components loaded. For a list of loadable components type clist(). To load a component *, type cload(*)"); componentlist = listcreate(50); cload(cname) = { local(j,k,str,txt); str = Str(cname); read(concat([componentfolder,str,".component"])); j = setsearch(componentlist,str,1); if(j, listinsert(componentlist,str,j); txt = componentlist[1]; for(k=2,length(componentlist), txt = concat([txt,", ",componentlist[k]]); ); addhelp(components,concat(["The following components have been loaded: ",txt,". For more information about the component *, type ?*. For a list of loadable components type clist()"])); ); } clist() = { print("\nLoadable components:"); system(concat(["ls ",componentfolder,"*.component | xargs -i_FOO_ basename _FOO_ .component"])); print("\nTo load a component *, type cload(*).\n"); } /* WARNING!!!! */ cload(hpxh);