Je suis nouveau à TCL et j'ai du mal à accéder à d'autres modules. La commande SOURCE m'a aidé à inclure d'autres codes que j'ai écrits dans un programme TCL. Cependant, je pense que j'ai un problème avec l'accès aux bibliothèques de code.Configurer TCL pour accéder aux bibliothèques tcl
Par exemple, lorsque je référence une fonction mathématique, elle n'est pas trouvée. Je pense qu'il doit y avoir quelque chose que je dois faire pour inclure où la bibliothèque de maths est sur mon ordinateur dans la recherche d'un programme appelé via tchsh85.
invalid command name "::math::statistics::mv-ols"
None of these directories exist on my computer: info library= C:/Tcl/lib/tcl8.5 auto_path= C:/Tcl/lib/tcl8.5 C:/Tcl/lib c:/tcl/lib/teapot/package/win32-x86_64/lib c:/tcl/lib/teapot/package/tcl/lib tcl library= C:/Tcl/lib/tcl8.5 auto_index= source C:/Tcl/lib/tcl8.5/word.tcl auto_index= source C:/Tcl/lib/tcl8.5/tm.tcl auto_index= source C:/Tcl/lib/tcl8.5/tm.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/parray.tcl auto_index= source C:/Tcl/lib/tcl8.5/history.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/history.tcl auto_index= source C:/Tcl/lib/tcl8.5/package.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/history.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/word.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/word.tcl auto_index= source C:/Tcl/lib/tcl8.5/package.tcl auto_index= source C:/Tcl/lib/tcl8.5/tm.tcl auto_index= source C:/Tcl/lib/tcl8.5/auto.tcl auto_index= source C:/Tcl/lib/tcl8.5/auto.tcl auto_index= source C:/Tcl/lib/tcl8.5/auto.tcl auto_index= source C:/Tcl/lib/tcl8.5/auto.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/auto.tcl auto_index= source C:/Tcl/lib/tcl8.5/history.tcl auto_index= source C:/Tcl/lib/tcl8.5/auto.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/history.tcl auto_index= source C:/Tcl/lib/tcl8.5/package.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/auto.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/auto.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/history.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/tm.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/auto.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/auto.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/word.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/package.tcl auto_index= source C:/Tcl/lib/tcl8.5/auto.tcl auto_index= source C:/Tcl/lib/tcl8.5/history.tcl auto_index= source C:/Tcl/lib/tcl8.5/package.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/word.tcl auto_index= source C:/Tcl/lib/tcl8.5/history.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/auto.tcl auto_index= source C:/Tcl/lib/tcl8.5/history.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl auto_index= source C:/Tcl/lib/tcl8.5/tm.tcl auto_index= source C:/Tcl/lib/tcl8.5/tm.tcl auto_index= source C:/Tcl/lib/tcl8.5/safe.tcl
J'ai reçu cette réponse: :: mathématiques :: statistiques fait partie de tcllib. Pour vérifier si vous l'avez installé, tapez
package nécessite tcllib et s'il est installé, il vous indiquera le numéro de version. Si ce n'est pas installé, vous pouvez utiliser Teacup pour l'installer pour vous.
J'ai essayé le code:
catch {package require nonexistentName}
package names
puts "[package names]"
et je reçus:
Thread logger img::pixmap TclOO tablelist_tile struct::tree opt tcltest img::ico img::pcx struct::set msgcat pngtcl tablelist::common ftp Tclx trsync tdom img::sgi report comm dde Mk4tcl img::sun img::gif img::window textutil cmdline csv img::tga Img img::png Tktable Itk Ttrace tipstack zlibtcl img::base platform fileutil Tk vfs ActiveTcl http tbcload Memchan style struct::graph tablelist treectrl struct::queue img::jpeg activestate::teapot::link img::bmp registry jpegtcl tdomhtml tooltip snit img::ppm struct::stack tcl::tommath img::tiff tls widget struct img::xpm md5 BWidget img::xbm log starkit Tcl Trf tifftcl Itcl img::ps sqlite3 base64 trofs
0.7
Je ne peux pas comprendre TCL mais dans d'autres langues que je l'ai utilisé, il un moyen de mettre en place une liste de répertoires ou des fichiers à rechercher dans un certain ordre pour le code appelé. Il me semble que je dois dire à tclsh85 où regarder. J'ai téléchargé tcl 8.5.13 et BWidget 1.9.6 à partir d'ActiveState J'ai installé tcl et j'ai décompacté BWidget sur mon ordinateur, mais il est dans un emplacement différent de celui de mes programmes tcl. Est-ce que les maths font partie de ça? Si non, que devrais-je télécharger? Comme je cours sur Windows Vista, je préfère simplement obtenir une version exécutable plutôt que quelque chose que j'ai besoin de construire. Je peux créer des programmes TCL et aussi longtemps qu'ils sont autonomes ou si je peux utiliser SOURCE, tout va bien. Là où j'ai des problèmes, j'appelle du code en dehors de mon programme.
Je m'inquiète que auto_path doive être configuré pour mon environnement car il ne correspond à rien sur mon ordinateur maintenant.
Veuillez répondre en supposant que je ne sais rien sur le fonctionnement de tcl. J'essaie de m'instruire (avec de l'aide de la documentation sur Internet et des personnes qui répondront aux questons).
Merci.
Veuillez noter que 'teacup' n'est pas une commande Tcl, elle doit être exécutée à partir de la ligne de commande (Start-> Run-> cmd). 'teacup update' va installer toutes les bibliothèques disponibles, mais cela peut prendre un certain temps. –