Re: documentation specification for Documentation Center
- To: mathgroup at smc.vnet.net
- Subject: [mg90049] Re: documentation specification for Documentation Center
- From: dh <dh at metrohm.ch>
- Date: Fri, 27 Jun 2008 06:17:23 -0400 (EDT)
- References: <g3vkkc$k76$1@smc.vnet.net>
Hi, what is the question, what the answer? Anyway, the code below does not fail because the package is wrongly written, but because a loop variable "i" is used outside the loop. hope this helps, Daniel Francisco Gutierrez wrote: > Friends: > I have problems creating packages. See for example the following very simple package: > BeginPackage["fuss`Func`"] > > crisclas::usage="Inputs are a set of training > vectors, a first guess vector, a zero, and a learning rate "; > > Begin["`Private`"] > > crisclas[trainingvec_,guess_,cero_,ritmo_]:=Module[{guess1=guess,\ > hacerlalista={}},If[trainingvec[[i]].guess-cero>0, guess, \ > For[i=1,i<Length[trainingvec] && trainingvec[[i]].guess1-cero<=0 \ > ,AppendTo[hacerlalista,guess1];guess1=(guess1+(ritmo*trainingvec[[i]])\ > ),i++ ];hacerlalista]]; > > End[] > EndPackage[] > > I saved it as Func.m. I can open it allright with Needs, but when I try to use the function it simply does not work and returns the following error me ssage: > Part::pspec : Part specification fuss`Func`Private`i is neither an integer nor a list of integers > > The function is ok, it works well it "notebook version". > What am I doing wrong? > Fg > --- On Wed, 1/16/08, Jose Luis Gomez <jose.luis.gomez at itesm.mx> wrote: > > From: Jose Luis Gomez <jose.luis.gomez at itesm.mx> > Subject: documentation specification for Documentation Center > Date: Wednesday, January 16, 2008, 3:24 AM > > Dear Ken, > > I guess you have already seen my tutorial for writing a package with > documentation in the Documentation Center. This tutorial is, well, it is Not > very good Neither satisfactory method, but it does show you some interesting > tricks: > http://homepage.cem.itesm.mx/lgomez/createMathematica6AddOn/createMathematic > a6AddOn.html > > (notice that long links get usually broken in the newsgroup, therefore you > might have to remove by hand the extra newlines in the link above) > > Or you can enter my main page: > http://homepage.cem.itesm.mx/lgomez/index.htm > then select "Teaching", then select "Mathematica 6", and > finally select "How > to create Mathematica 6 Add ons..." > > I hope it helps > > Jose > > -----Mensaje original----- > De: Ken Levasseur [mailto:klevasseur at mac.com] > Enviado el: Lunes, 14 de Enero de 2008 02:47 a.m. > Para: mathgroup at smc.vnet.net > Asunto: documentation specification for Documentation Center > > Has anyone seen specifications on how to write and install > documentation in the Mathematica Documentation Center? > > II posted the following message (mg77434) last June and never got a > response. > >> Can anyone point me to documentation on how to create Documentation >> Center pages? >> >> I get the impression that the Help Browser's days are numbered. Is >> that true? If so, is there an easy way to convert Help Browser >> documentation? >> > > > Ken Levasseur > UMass Lowell > a6AddOn.html -- Daniel Huber Metrohm Ltd. Oberdorfstr. 68 CH-9100 Herisau Tel. +41 71 353 8585, Fax +41 71 353 8907 E-Mail:<mailto:dh at metrohm.com> Internet:<http://www.metrohm.com>